Additional warnings (-W) revisited

Joerg Mayer jmayer at loplof.de
Tue Apr 16 18:22:10 CDT 2002


Hello,

a year or more ago I started an attempt to turn on additional warnings
with gccs -W switch. The amount of additional warnings created made any
warnings useless (the current count is >2700). I've just thought about
the problem again and come up with a divide and conquer approach:
Why not turn -W on and disable the additional warnings on a per directory
basis? The idea is to turn on the additional warnings and then disable
them on a per directory/type basis by putting a file into each directory
turning off one or both of the additional warnings that occur very often
(signed/unsigned comparisons and unused parameters/variables). If both
warnings should be shown in a directory, the file may be removed.
I've attached an example patch and the initial look of the .nowarn file.
What do you think of the idea in general and this particular solution?

   Ciao
                Jörg
--
Joerg Mayer                                          <jmayer at loplof.de>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.
-------------- next part --------------
Index: wine/Make.rules.in
===================================================================
RCS file: /home/wine/wine/Make.rules.in,v
retrieving revision 1.106
diff -u -r1.106 Make.rules.in
--- wine/Make.rules.in	2 Apr 2002 02:58:45 -0000	1.106
+++ wine/Make.rules.in	16 Apr 2002 23:04:02 -0000
@@ -112,7 +112,7 @@
 .SUFFIXES: .mc .rc .mc.rc .res .spec .spec.c .spec.def .glue.c .pl .ok
 
 .c.o:
-	$(CC) -c $(ALLCFLAGS) -o $@ $<
+	$(CC) -c $(ALLCFLAGS) `test -f .nowarn && cat .nowarn` -o $@ $<
 
 .s.o:
 	$(AS) -o $@ $<
Index: wine/configure
===================================================================
RCS file: /home/wine/wine/configure,v
retrieving revision 1.276
diff -u -r1.276 configure
--- wine/configure	12 Apr 2002 01:04:32 -0000	1.276
+++ wine/configure	16 Apr 2002 23:04:05 -0000
@@ -9310,7 +9310,7 @@
 
 if test "x${GCC}" = "xyes"
 then
-  CFLAGS="$CFLAGS -Wall"
+  CFLAGS="$CFLAGS -Wall -W"
   echo "$as_me:$LINENO: checking for gcc strength-reduce bug" >&5
 echo $ECHO_N "checking for gcc strength-reduce bug... $ECHO_C" >&6
 if test "${ac_cv_c_gcc_strength_bug+set}" = set; then
-------------- next part --------------
-Wno-unused -Wno-sign-compare


More information about the wine-devel mailing list