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 for
more information. My problem here is that the evaluation order isn't
just undefined to the compiler :-)
Regards, Luis.