]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Remove "unused" warnings from lex generated files
authorMarc Dionne <marc.c.dionne@gmail.com>
Sun, 22 Nov 2009 19:17:19 +0000 (14:17 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Mon, 23 Nov 2009 01:35:38 +0000 (17:35 -0800)
Some (f)lex generated source files produce warnings because of unused
labels or variables.
Since there is limited control of the source itself, just be more
permissive in this particular case with -Wno-unused.

Change-Id: Ice25019f8a592a25f5084e88119b68846d900033
Reviewed-on: http://gerrit.openafs.org/867
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
README.WARNINGS
src/cf/osconf.m4
src/comerr/Makefile.in
src/uss/Makefile.in

index 89b195dba16ef8282f163b5495d0fda537ac255e..ca3ecccfd34052a178f778f92149ad81c6b97d05 100644 (file)
@@ -53,7 +53,6 @@ bucoord/commands.c   : all         : Ubik_Call
                                     : signed vs unsigned for dates
 butc/tcmain.c       : all           : prototypes
 butc/tcudbprocs.c    : all          : ubik_Call
-comerr/error_table.c : all           : Autogenerated file with unused labels
 kauth/admin_tools.c  : all           : ubik_Call nonsense
 kauth/authclient.c   : strict-proto  : ubik_Call nonsense
 libadmin/bos/afs_bosAdmin.c: all     : DES keys, time types, and const
@@ -73,7 +72,6 @@ ubik/beacon.c        : all           : Ubik uses signed/unsigned
 ubik/ubikclient.c    : strict-protos : ubik_Call
 uss/uss_vol.c       : all             Format issues
 uss/uss_kauth.c      : all          : Des keys, ubik_Call
-uss/lex.yy.c         : all           : Unused symbols
 viced/fsprobe.c      : all          : ubik_Call
 vol/salvager.c       : all           : consts & undefined variable from header - maybe fixed!
 volser/vol-dump.c    : format        : afs_sfsize_t
index c61a57d2a6f123b3b2daeee9beaefc1f1ec60d49..9fdf142b20a70fbe491182362a9be2949afff95c 100644 (file)
@@ -1195,6 +1195,12 @@ if test "x$GCC" = "xyes"; then
   fi
 fi
 
+if test "x$GCC" = "xyes"; then
+  CFLAGS_NOUNUSED="-Wno-unused"
+else
+  CFLAGS_NOUNUSED=
+fi
+
 dnl horribly cheating, assuming double / is ok.
 case $INSTALL in
   ./* ) 
@@ -1245,6 +1251,7 @@ AC_SUBST(TXLIBS)
 AC_SUBST(VFSCK_CFLAGS)
 AC_SUBST(XCFLAGS)
 AC_SUBST(CFLAGS_NOERROR)
+AC_SUBST(CFLAGS_NOUNUSED)
 AC_SUBST(XCFLAGS64)
 AC_SUBST(XLDFLAGS)
 AC_SUBST(XLDFLAGS64)
index d3b4a49e1041b97338334b32eeb62ca1b0349cb0..26b202c7ece457d2f9f75068fdccfd195b876973 100644 (file)
@@ -47,7 +47,7 @@ libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
 # so we need to add the source directory to the includes to pick up local headers.
 #
 error_table.o: error_table.c
-       $(CC) $(CFLAGS) -I${srcdir} @CFLAGS_NOERROR@ -c $<
+       $(CC) $(CFLAGS) -I${srcdir} @CFLAGS_NOUNUSED@ -c $<
 
 #
 # Installation targets
index dffc21a1d30ff405efc1b025742c1bc39cc5919d..f5d25638c2b8986ca8bd43756006d2b4eed93b06 100644 (file)
@@ -74,7 +74,7 @@ uss_fs.o : uss_fs.c
        ${CC} -c ${CFLAGS} ${srcdir}/uss_fs.c
 
 lex.yy.o : lex.yy.c y.tab.c
-       ${CC} -c ${CFLAGS} @CFLAGS_NOERROR@ lex.yy.c
+       ${CC} -c ${CFLAGS} @CFLAGS_NOUNUSED@ lex.yy.c
 
 lex.yy.c : lex.l
        ${LEX} ${srcdir}/lex.l