From: | Luis Ochoa <ziul1979(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com> |
Cc: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: wxWidgets 2.9 build |
Date: | 2011-01-26 16:42:21 |
Message-ID: | AANLkTimEj5NNaKGndkxdZf2GCefDWfUim8HkVeyUan1s@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
I believe this warning is because something simple, try to verify that
pointer is set before using for evaluation of an expression, in other words
(example warning at gqb/gqbViewPanels.cpp:211)
(add if expression before using gModel...)
if(gModel) or if(gModel!=NULL) ....
gModel->changesPositions(selTop,selTop--);
that help you to verify that pointer is not null before using it. I don't
test/try this solution because at my compiler that warning is not shown, but
I believe is going to work.
Here's another warning of interest that I haven't been able to fix yet:
>
> ./gqb/gqbViewPanels.cpp: In member function ‘void
> gqbGridPanel::OnButtonUp(wxCommandEvent&)’:
> ./gqb/gqbViewPanels.cpp:211:45: warning: operation on
> ‘((gqbGridPanel*)this)->gqbGridPanel::selTop’ may be undefined
> ./gqb/gqbViewPanels.cpp: In member function ‘void
> gqbGridPanel::OnButtonDown(wxCommandEvent&)’:
> ./gqb/gqbViewPanels.cpp:292:45: warning: operation on
> ‘((gqbGridPanel*)this)->gqbGridPanel::selTop’ may be undefined
> ./gqb/gqbViewPanels.cpp: In member function ‘void
> gqbOrderPanel::OnButtonUp(wxCommandEvent&)’:
> ./gqb/gqbViewPanels.cpp:1133:59: warning: operation on
> ‘((gqbOrderPanel*)this)->gqbOrderPanel::selRightTop’ may be undefined
> ./gqb/gqbViewPanels.cpp: In member function ‘void
> gqbOrderPanel::OnButtonDown(wxCommandEvent&)’:
> ./gqb/gqbViewPanels.cpp:1214:59: warning: operation on
> ‘((gqbOrderPanel*)this)->gqbOrderPanel::selRightTop’ may be undefined
>
> Basically, if you read a variable twice in an expression where it is
> also written to, the result is undefined. See
> http://www2.research.att.com/~bs/bs_faq2.html#evaluation-order<http://www2.research.att.com/%7Ebs/bs_faq2.html#evaluation-order>for
> more information. My problem here is that the evaluation order isn't
> just undefined to the compiler :-)
>
>
Regards, Luis.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2011-01-26 18:41:33 | Re: wxWidgets 2.9 build |
Previous Message | Peter Geoghegan | 2011-01-26 15:40:54 | Re: wxWidgets 2.9 build |