Use GCC's -Wtype-limits, take 2

Gerald Pfeifer gerald at pfeifer.com
Sun Jan 27 18:28:59 CST 2008


After dozens of patches in the last two months I believe we are now
ready for this patch.

Many of the real bug fixes I made recently (or triggered others to
make ;-) where found by GCC's -Wtype-limits option that will appear in
GCC 4.3 which is already the default compiler in openSUSE development
trees.

This enables warnings of the kind
  comparison of unsigned expression < 0 is always false
that more often than not indicate real bugs in the code.

Gerald

ChangeLog:
Use GCC's -Wtype-limits if possible.

Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.735
diff -u -3 -p -r1.735 configure.ac
--- configure.ac	7 Jan 2008 22:26:18 -0000	1.735
+++ configure.ac	16 Jan 2008 19:09:38 -0000
@@ -1211,6 +1211,7 @@ then
   WINE_TRY_CFLAGS([-fno-strict-aliasing])
   WINE_TRY_CFLAGS([-Wdeclaration-after-statement])
   WINE_TRY_CFLAGS([-Wwrite-strings])
+  WINE_TRY_CFLAGS([-Wtype-limits])
 
   dnl Check for noisy string.h
   saved_CFLAGS="$CFLAGS"



More information about the wine-patches mailing list