Re: [AD] -Wno-unused

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tue, 2005-01-11 at 08:42 +1100, Peter Wang wrote:
> >But, looking into the gcc manual, I think we should change the
> >"-Wno-unused" to "-Wno-unused-parameter". That way, it will still not
> >warn about unused parameters, but it will warn about unused local
> >variables at least, which is a good thing.
> >
> 
> I would prefer to get rid of -Wno-unused completely, but that sounds fine.
> 

Ok, attached is a patch which simply replaces it with
-Wno-unused-parameter, for all gcc based makefiles. A problem is just,
it breaks with old gcc versions (<3.0).

-- 
Elias Pschernig
Index: makefile.be
===================================================================
RCS file: /cvsroot/alleg/allegro/makefile.be,v
retrieving revision 1.48
diff -u -p -r1.48 makefile.be
--- makefile.be	26 Nov 2004 16:05:12 -0000	1.48
+++ makefile.be	28 Jan 2005 14:23:49 -0000
@@ -44,9 +44,9 @@ _default: default
 # -------- decide what compiler options to use --------
 
 ifdef WARNMODE
-WFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused -Wno-multichar -Wno-ctor-dtor-privacy -Werror
+WFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused-parameter -Wno-multichar -Wno-ctor-dtor-privacy -Werror
 else
-WFLAGS = -Wall -Wno-unused -Wno-multichar -Wno-ctor-dtor-privacy
+WFLAGS = -Wall -Wno-unused-parameter -Wno-multichar -Wno-ctor-dtor-privacy
 endif
 
 ifdef TARGET_ARCH_COMPAT
Index: makefile.dj
===================================================================
RCS file: /cvsroot/alleg/allegro/makefile.dj,v
retrieving revision 1.38
diff -u -p -r1.38 makefile.dj
--- makefile.dj	22 Oct 2004 23:22:24 -0000	1.38
+++ makefile.dj	28 Jan 2005 14:23:53 -0000
@@ -161,9 +161,9 @@ _default: default
 # -------- decide what compiler options to use --------
 
 ifdef WARNMODE
-   WFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused -Werror
+   WFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused-parameter -Werror
 else
-   WFLAGS = -Wall -Wno-unused
+   WFLAGS = -Wall -Wno-unused-parameter
 endif
 
 
Index: makefile.mgw
===================================================================
RCS file: /cvsroot/alleg/allegro/makefile.mgw,v
retrieving revision 1.99
diff -u -p -r1.99 makefile.mgw
--- makefile.mgw	23 Nov 2004 18:37:05 -0000	1.99
+++ makefile.mgw	28 Jan 2005 14:23:55 -0000
@@ -136,9 +136,9 @@ ifdef ALLEGRO_USE_CYGWIN
 endif
 
 ifdef WARNMODE
-   WFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused -Werror
+   WFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused-parameter -Werror
 else
-   WFLAGS = -Wall -Wno-unused
+   WFLAGS = -Wall -Wno-unused-parameter
 endif
 
 ifdef TARGET_ARCH_COMPAT
Index: makefile.osx
===================================================================
RCS file: /cvsroot/alleg/allegro/makefile.osx,v
retrieving revision 1.42
diff -u -p -r1.42 makefile.osx
--- makefile.osx	22 Jan 2005 12:50:07 -0000	1.42
+++ makefile.osx	28 Jan 2005 14:23:55 -0000
@@ -79,9 +79,9 @@ _default: default
 # -------- decide what compiler options to use --------
 
 ifdef WARNMODE
-   WFLAGS = -Wall -W -Werror -Wno-unused -Wno-long-double
+   WFLAGS = -Wall -W -Werror -Wno-unused-parameter -Wno-long-double
 else
-   WFLAGS = -Wall -Wno-unused -Wno-long-double
+   WFLAGS = -Wall -Wno-unused-parameter -Wno-long-double
 endif
 
 ifdef TARGET_ARCH_COMPAT
Index: configure.in
===================================================================
RCS file: /cvsroot/alleg/allegro/configure.in,v
retrieving revision 1.85
diff -u -p -r1.85 configure.in
--- configure.in	27 Sep 2004 16:49:22 -0000	1.85
+++ configure.in	28 Jan 2005 14:23:56 -0000
@@ -690,9 +690,9 @@ CFLAGS="$CFLAGS -DALLEGRO_LIB_BUILD"
 dnl How to compile C and asm files.
 if test -n "GCC"; then
   if test "X$allegro_strict_warnings" = "Xyes"; then
-    WFLAGS="-Wall -W -Wstrict-prototypes -Wno-unused -Werror"
+    WFLAGS="-Wall -W -Wstrict-prototypes -Wno-unused-parameter -Werror"
   else
-    WFLAGS="-Wall -Wno-unused"
+    WFLAGS="-Wall -Wno-unused-parameter"
   fi
   if test "X$allegro_cv_processor_type" = "Xi386"; then
     if test "$allegro_exclusive_optimizations" != none; then


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/