[AD] Warnmode strengthening on Unix |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
This patch, based on Philipp Thomas' work, aims to strengthen the compilation requirements in warnmode by adding -W -Wno-unused (like under DOS/Windows) to the list of options. This makes it easy to find bugs caused by inadvertent comparisons between signed and unsigned types, as Philipp pointed out. However, I chose the other way around with regard to Philipp's original patch. Most problems occur because an 'int' variable is somewhere compared with a 'sizeof' expression. I think that it is far more natural to do the comparison in _signed_ mode rather than in unsigned mode, you don't have to guard every comparison in case the variable happens to be negative. -- Eric Botcazou
Attachment:
unix_warnmode.zip
Description: Zip archive
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |