[Scummvm-devel] Enabling -Wparentheses in the Makefile
ori at avtalion.name
Sun Mar 29 22:14:54 CEST 2009
I'd like to argue for the inclusion of -Wparentheses in the Makefile.
While it is sometimes pedantic in its requirements, I find it very useful.
It has helped catch two bugs in ScummVM, related to missing parentheses
in expressions like "a && b || c", and a bug in my own KoM code where I
typed "&" instead of "&&".
I'm attaching a patch that silences the current warnings in the code. It
highlights the various areas that it warns upon, so you can judge for
yourself whether it's a good thing to have.
I actually found the bug in KoM after sanguine compiled it on MVSC.
Apparently it's not disabled in the pragmas in common/scummsys.h :)
What do you think?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5553 bytes
Desc: not available
More information about the Scummvm-devel