[Qt-interest] QMAKE_CXXFLAGS += -Wno-reorder fails because qmake adds -Wall after it
Robert Hairgrove
evorgriahr at hispeed.ch
Wed Jul 8 16:39:54 CEST 2009
Bart van Deenen wrote:
> Hi
>
>
> I'm getting these irritating gcc compiler warnings that I don't care about.
>
>
> sibling.h: In constructor ‘Sibling::Sibling(int, QHostAddress)’:
> sibling.h:13: warning: ‘Sibling::up’ will be initialized after
> sibling.h:12: warning: ‘int Sibling::retry_ct’
>
>
> The way to not generate these errors is with -Wno-reorder, but qmake adds a
> -Wall after my -Wno-reorder, which cancels the wanted effect.
>
>
> How do I tell qmake to add -Wno-reorder AFTER the -Wall it adds itself
> to the make file.
>
>
> Thanks
>
>
> Bart van Deenen
Someone else already gave you the answer for turning off the warning.
However, the alternative (and IMHO better) solution would be to fix the
implementation of the constructor for Sibling so that the initialisation
list matches the order of the members as declared in the header file.
Then there will be no warning to disable. :)
HTH
More information about the Qt-interest-old
mailing list