Add support for warning checked builds
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 28 Sep 2009 10:07:58 +0000 (12:07 +0200)
committerDerrick Brashear <shadow|account-1000005@unknown>
Mon, 28 Sep 2009 12:00:04 +0000 (05:00 -0700)
This patch adds a '--enable-checking' configuration option. When this
option is supplied, and gcc is in use, the compiler will treat any
warnings as errors. This will hopefully help stop new warnings from
creeping into the tree.

In order to still be able to build, all of the currently existing
warnings are accepted (these are documented in README.WARNINGS). With
this set of warning inhibitions, the tree is known to build on 32bit
Leopard - other systems may vary. Warning inhibition may be disabled
by supplying --enable-checking=all - in this case the tree will
definitely not build!

If --enabled-checking is not specified, the existing compilation
behaviour is maintained, so there is no user-visible change.

Gcc 4.2, or later, is required to use the pragma sets contained within
this patch. Again, they are not visible unless --enable-checking is
given.

Reviewed-on: http://gerrit.openafs.org/526
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

40 files changed:
README.WARNINGS [new file with mode: 0644]
acinclude.m4
src/afs/afs_syscall.c
src/afsd/Makefile.in
src/afsd/afsd.c
src/auth/Makefile.in
src/bozo/Makefile.in
src/bozo/bosserver.c
src/bubasics/Makefile.in
src/bucoord/Makefile.in
src/bucoord/ubik_db_if.c
src/budb/Makefile.in
src/butc/Makefile.in
src/cf/osconf.m4
src/comerr/Makefile.in
src/config/Makefile.config.in
src/fsint/Makefile.in
src/fsprobe/Makefile.in
src/kauth/Makefile.in
src/libadmin/bos/Makefile.in
src/libadmin/kas/Makefile.in
src/libadmin/samples/Makefile.in
src/libadmin/samples/rxdebug_peers.c
src/libadmin/test/Makefile.in
src/libadmin/vos/Makefile.in
src/libafsauthent/Makefile.in
src/libafsrpc/Makefile.in
src/libuafs/Makefile.common.in
src/ptserver/Makefile.in
src/rxkad/Makefile.in
src/tviced/Makefile.in
src/ubik/Makefile.in
src/ubik/ubikclient.c
src/uss/Makefile.in
src/viced/Makefile.in
src/vlserver/Makefile.in
src/vol/Makefile.in
src/volser/Makefile.in
src/volser/vol-dump.c
src/volser/vsprocs.c

diff --git a/README.WARNINGS b/README.WARNINGS
new file mode 100644 (file)
index 0000000..6dd52ed
--- /dev/null
@@ -0,0 +1,104 @@
+OpenAFS Warning detection
+-------------------------
+
+There's been a concerted effort over the last few years, by many developers,
+to reduce the number of warnings in the OpenAFS tree. In an attempt to
+prevent warnings from creeping back in, we now have the ability to break the
+build when new warnings appear.
+
+This is only available for systems with gcc 4.2 or later, and is disabled 
+unless the --enable-checking option is supplied to configure. Because we
+can't remove all of the warnings, we permit file by file (and warning by
+warning) disabling of specific warnings. The --enable-checking=all prevents
+this, and errors for any file containing a warning.
+
+Disabling warnings
+------------------
+
+If warnings are unavoidable in a particular part of the build, they may be
+disabled in an number of ways.
+
+You can disable a single warning type in a particular file by using GCC
+pragmas. If a warning can be disabled with a pragma, then the switch to use
+will be listed in the error message you receive from the compiler. Pragmas
+should be wrapped in IGNORE_SOME_GCC_WARNINGS, so that they aren't used 
+with non-gcc compilers, and can be disabled if desired. For example:
+  #ifdef IGNORE_SOME_GCC_WARNINGS
+  # pragma GCC diagnostic warning "-Wold-style-definition"
+  #endif
+
+If a pragma isn't available for your particular warning, you will need to 
+disable all warnings for the file in question. You can do this by supplying
+the autoconf macro @CFLAGS_NOERROR@ in the build options for the file. For 
+example:
+  lex.yy.o : lex.yy.c y.tab.c
+         ${CC} -c ${CFLAGS} @CFLAGS_NOERROR@ lex.yy.c
+
+If you add a new warning inhibition, please also add it to the list below.
+
+Inhibited warnings
+------------------
+
+afs/afs_syscall.c    : old-style
+                    : strict-proto
+                    : all (ukernel) : syscall pointer issues
+afsd/afsd.c          : deprecated    : daemon() marked as deprecated on Darwin
+                    : all           : call_syscall missing prototype
+auth/ktc.c           : all (ukernel) : call_syscall doesn't have a prototype
+bozo/bosserver.c     : deprecated    : daemon() marked as deprecated on Darwin
+bozo/bosoprocs.c     : all           : ExtendedCellInfo and des key types
+bozo/bos.c           : all           : DES key types & string consts 
+bozo/bos_util.c      : all           : DES key types
+bubasics/bumon.ss.c  : all          : BC_Print collision betwen client & server
+bucoord/ubik_db_if.c : strict-proto  : Ubik_Call
+                    : all           : Public version of volser_prototypes req
+bucoord/volstub.c    : all           : Public version of volser_prototypes req
+bucoord/commands.c   : all          : Ubik_Call
+                                    : signed vs unsigned for dates
+budb/server.c        : all          : ExtendedCellInfo
+butc/lwps.c          : all           : Public version of volser_prototypes req
+butc/tcmain.c       : all           : prototypes / signed warnings (XXX)
+butc/recoverDb.c     : all          : pointer target issues (XXX)
+butc/tcudbprocs.c    : all          : ubik_Call
+butc/dump.c         : all           : pointer types (XXX)
+comerr/error_table.c : all           : Autogenerated file with unused labels
+fsint/afsint.xdr.c   : all           : rxgen opaque vectors problem
+fsprobe/fsprobe.c    : all          : Public version of volser_prototypes req
+kauth/kaprocs.c             : all           : XXX
+kauth/kaserver.c     : all          : ExtendedCellInfo
+kauth/krb_udp.c      : all           : XXX
+kauth/admin_tools.c  : all           : ubik_Call nonsense
+kauth/authclient.c   : all           : ubik_Call nonsense
+kauth/kas.c          : all           : XXX
+kauth/klog.c         : all           : XXX
+kauth/ka-forwarder.c : all           : XXX
+libadmin/bos/afs_bosAdmin.c: all     : DES keys, time types, and const
+libadmin/kas/afs_kasAdmin.c: all     : Ubik_Call nonsense, DES keys
+libadmin/samples/rxstat_query_peer.c : all : util_RPCStatsStateGet types
+libadmin/samples/rxstat_query_process.c : all : util_RPCStatsStateGet types
+libadmin/samples/rxdebug_peers.c : format : struct clock vs unsigned int
+libadmin/test/client.c : all         : util_RPCStatsStateGet types
+ptserver/ptserver.c  : all          : ExtendedCellInfo
+rxkad/rxkad_server.c : all           : Des key nonsense
+rxkad/ticket.c       : all           : Des key nonsense
+rxkad/ticket5.c             : all           : Des key nonsense
+rxkad/v5der.c       : all (pthread) : Des key nonsense
+rx/rx.c                     : all (pthread) : rxkad_global_stats_init not proto'd
+rx/xdr_rx.c          : all (ukernel) : Prototypes don't match due to AFS_XDR_T 
+                                      not being used in the xdr header
+ubik/utst_int_ss.c   : all           : Client / Server symbol collisions
+ubik/beacon.c        : all           : Ubik uses signed/unsigned 
+                                      interchangably for IP addresses, a 
+                                      fix will require API changes.
+ubik/ubikclient.c    : strict-protos : ubik_Call
+uss/uss_vol.c       : all           : Public version of volser_prototypes req
+                                      Format issues
+uss/uss_kauth.c      : all          : Des keys, ubik_Call
+uss/lex.yy.c         : all           : Unused symbols
+viced/fsprobe.c      : all          : ubik_Call
+vlserver/vlserver.c  : all          : GetExtendedCellInfo
+vol/salvager.c       : all           : consts & undefined variable from header
+volser/vos.c         : all           : ubik_Call_New, signedness and const
+volser/vol-dump.c    : format        : afs_sfsize_t
+volser/vsprocs.c     : format-extra  : The ONERROR macro needs to be rethought
+
index 0b79781..973826e 100644 (file)
@@ -252,6 +252,12 @@ AC_ARG_ENABLE([warnings],
          disabled)])],
     ,
     [enable_warnings="no"])
+AC_ARG_ENABLE([checking],
+    [AS_HELP_STRING([--enable-checking],
+       [turn compilation warnings into errors when building with gcc (defaults
+        to disabled)])],
+    [enable_checking="$enableval"],
+    [enable_checking="no"])
 AC_ARG_ENABLE([debug-kernel],
     [AS_HELP_STRING([--enable-debug-kernel],
         [enable compilation of the kernel module with debugging information
index 5557ed7..52c2b47 100644 (file)
 #include <afsconfig.h>
 #include "afs/param.h"
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wold-style-definition"
+# pragma GCC diagnostic warning "-Wstrict-prototypes"
+#endif
 
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
 #include "afsincludes.h"       /* Afs-based standard headers */
index cdb488a..bf60000 100644 (file)
@@ -27,7 +27,7 @@ all: afsd vsys
 AFSLIBS=${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a
 
 afsd: afsd.o $(AFSLIBS) $(AFSD_LIBS)
-       ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSD_LDFLAGS) $(AFSLIBS) ${XLIBS} ${AFSD_LIBS}
+       ${CC} ${CFLAGS} -o afsd afsd.o @CFLAGS_NOERROR@ $(NON_SHARED) $(LDFLAGS) $(AFSD_LDFLAGS) $(AFSLIBS) ${XLIBS} ${AFSD_LIBS}
 
 vsys: vsys.o
        ${CC} ${CFLAGS} -o vsys vsys.o ${TOP_LIBDIR}/libsys.a $(LDFLAGS) ${XLIBS}
@@ -36,6 +36,7 @@ vsys: vsys.o
 # Objects
 #
 afsd.o: afsd.c AFS_component_version_number.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 vsys.o: vsys.c AFS_component_version_number.c
 
index 5fbdf8d..34d83cd 100644 (file)
@@ -61,6 +61,9 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#endif
 
 #define VFS 1
 
index 9d488cd..58f6dd4 100644 (file)
@@ -7,6 +7,7 @@
 
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
+
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
index d148c6b..71767ad 100644 (file)
@@ -89,13 +89,16 @@ cronbnodeops.o: cronbnodeops.c ${INCLS}
 bnode.o: bnode.c ${INCLS}
 
 bosoprocs.o: bosoprocs.c ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 bos.o: bos.c ${INCLS} AFS_component_version_number.o
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 bos: bos.o $(LIBS) libbos.a
        ${CC} ${CFLAGS} -o bos bos.o libbos.a $(LIBS)  ${XLIBS}
 
 bos_util.o: bos_util.c ${INCLS} AFS_component_version_number.o ${TOP_INCDIR}/afs/bnode.h
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 bos_util: bos_util.o $(LIBS) 
        ${CC} ${CFLAGS} -o bos_util bos_util.o $(LIBS)  ${XLIBS}
index 4c5159e..f6c41be 100644 (file)
@@ -10,6 +10,9 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#endif
 
 #include <afs/stds.h>
 #include <sys/types.h>
index ab0444f..e4d21ed 100644 (file)
@@ -93,6 +93,9 @@ butx_errs.c: butx_errs.et
        $(RM) -f butx.h butx_errs.c
        ${COMPILE_ET} -p ${srcdir} butx_errs -h butx
 
+bumon.ss.o: bumon.ss.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 #
 # Installation targets
 #
index 58561ee..ad000c9 100644 (file)
@@ -69,6 +69,21 @@ bucoord_errs.c bc.h: bucoord_errs.et bc.p.h
        ${COMPILE_ET} -p ${srcdir} bucoord_errs -h bc
 
 #
+# Errors
+#
+ubik_db_if.o: ubik_db_if.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
+volstub.o: volstub.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
+commands.o: commands.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
+regex.o: regex.c
+       $(CC) $(CFLAGS) -c $<
+
+#
 # Install targets
 #
 
index 655c642..0338c2c 100644 (file)
@@ -12,6 +12,9 @@
 #include <afsconfig.h>
 #include <afs/stds.h>
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wstrict-prototypes"
+#endif
 
 #include <sys/types.h>
 #include <fcntl.h>
index 9611616..caf3f96 100644 (file)
@@ -115,6 +115,10 @@ libbudb.a: budb_errs.o budb.cs.o budb.xdr.o struct_ops.o AFS_component_version_n
        $(AR) crv $@ budb_errs.o budb.cs.o budb.xdr.o struct_ops.o AFS_component_version_number.o
        $(RANLIB) $@
 
+# Errors
+server.o: server.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 #
 # Install targets
 #
index 82f17d3..bb0f44d 100644 (file)
@@ -68,14 +68,19 @@ butc: ${SOBJS} ${LIBS} ${INCLS} ${HACKS}
        esac
 
 tcmain.o: tcmain.c ${INCLS} AFS_component_version_number.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 dbentries.o: dbentries.c ${INCLS}
 tcprocs.o: tcprocs.c ${INCLS}
 test.o: test.c ${INCLS} AFS_component_version_number.c
 lwps.o: lwps.c ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 list.o: list.c ${INCLS}
 recoverDb.o: recoverDb.c ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 tcudbprocs.o: tcudbprocs.c ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 dump.o: dump.c ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 tcstatus.o: tcstatus.c ${INCLS}
 
 read_tape: read_tape.c
index 0947a21..02e9699 100644 (file)
@@ -1180,10 +1180,19 @@ else
   NO_STRIP_BIN=
 fi
 
-if test "x$enable_warnings" = "xyes"; then
-  if test "x$GCC" = "xyes"; then
+CFLAGS_NOERROR=
+
+if test "x$GCC" = "xyes"; then
+  if test "x$enable_warnings" = "xyes"; then
     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition"
   fi
+  if test "x$enable_checking" != "xno"; then
+    XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option"
+    if test "x$enable_checking" != "xall"; then
+      CFLAGS_NOERROR="-Wno-error"
+      AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode])
+    fi
+  fi
 fi
 
 dnl horribly cheating, assuming double / is ok.
@@ -1235,6 +1244,7 @@ AC_SUBST(SHLIB_SUFFIX)
 AC_SUBST(TXLIBS)
 AC_SUBST(VFSCK_CFLAGS)
 AC_SUBST(XCFLAGS)
+AC_SUBST(CFLAGS_NOERROR)
 AC_SUBST(XCFLAGS64)
 AC_SUBST(XLDFLAGS)
 AC_SUBST(XLDFLAGS64)
index 1159918..e43ea5d 100644 (file)
@@ -43,6 +43,14 @@ libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
        $(RANLIB) $@
 
 #
+# Files with errors
+#
+# The autogenerated file from bison has an unused label
+
+error_table.o: error_table.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
+#
 # Installation targets
 #
 install: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
index 792ea44..aafd46a 100644 (file)
@@ -126,7 +126,7 @@ SHELL = /bin/sh
 COMMON_INCL=-I${TOP_OBJDIR}/src/config -I. -I${srcdir} -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -I${TOP_INCDIR}/rx -I${TOP_OBJDIR} -I${TOP_SRCDIR} -I${TOP_OBJDIR}/src
 COMMON_CFLAGS=${DBG} ${OPTMZ} ${COMMON_INCL}
 
-CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS}
+CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS} $(CFLAGS_NOERROR)
 LDFLAGS=${XLDFLAGS} ${ARCHFLAGS}
 
 .c.o:
index 587a7e0..fa1c197 100644 (file)
@@ -107,6 +107,13 @@ afsint.h: common.xg afsint.xg
 afscbint.h: common.xg afscbint.xg
        ${RXGEN} -A -x -h -o afscbint.h ${srcdir}/afscbint.xg
 
+# Files with warnings
+# rpcgen currently handles opaque vectors badly
+#     - it relies on char a[1]; &a == a; which leads to type errors
+
+afsint.xdr.o: afsint.xdr.c
+       $(CC) $(CFLAGS) -c @CFLAGS_NOERROR@ $<
+
 #
 # Installation targets
 #
index c9e6bd4..0550f5c 100644 (file)
@@ -46,6 +46,7 @@ libfsprobe.a: fsprobe.o fsprobe_callback.o AFS_component_version_number.o
        $(RANLIB) $@
 
 fsprobe.o: fsprobe.c ${INCLS} AFS_component_version_number.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 fsprobe_callback.o: fsprobe_callback.c ${INCLS}
 
index 8f98dc4..7b81fba 100644 (file)
@@ -88,6 +88,7 @@ kaserver: kautils.o kalocalcell.o kadatabase.o kaprocs.o kalog.o kauth.ss.o kaut
        ${CC} ${LDFLAGS} -o kaserver kaserver.o kautils.o kalocalcell.o kadatabase.o krb_udp.o kaprocs.o kalog.o kauth.ss.o kauth.xdr.o kaaux.o kaauxdb.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libaudit.a
 
 kaserver.o: kaserver.c ${INCLS} AFS_component_version_number.o
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 kautils.o: kautils.c ${INCLS}
 
@@ -97,9 +98,13 @@ kadatabase.o: kadatabase.c ${INCLS}
        ${CC} ${CFLAGS} -c ${srcdir}/kadatabase.c 
 
 kaprocs.o: kaprocs.c ${INCLS} kaport.h
-       ${CC} ${CFLAGS} -c ${srcdir}/kaprocs.c 
+       ${CC} ${CFLAGS} @CFLAGS_NOERROR@ -c $<
 
 authclient.o: authclient.c ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
+kaauxdb.o: kaauxdb.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 kaerrors.o: kaerrors.c
 
@@ -158,8 +163,10 @@ token.o: token.c ${INCLS}
 client.o: client.c ${INCLS} AFS_component_version_number.o
 
 kas.o: kas.c ${INCLS} AFS_component_version_number.o
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 admin_tools.o: admin_tools.c ${INCLS} kaport.h
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 kkids.o: kkids.c ${INCLS}
 
@@ -174,6 +181,7 @@ klog: AFS_component_version_number.o kauth.h kautils.h libkauth.a $(LIBS) \
        ${CC} ${LDFLAGS} -o klog klog.o libkauth.a ${LIBS} ${XLIBS}
 
 klog.o: klog.c kauth.h kautils.h AFS_component_version_number.o
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 klog.krb: kauth.h kautils.h libkauth.krb.a $(KLIBS) klog.o
        ${CC} ${LDFLAGS} -o klog.krb klog.o libkauth.krb.a ${KLIBS} ${XLIBS}
@@ -216,10 +224,14 @@ kdb: kdb.o ${INCLS} ${LIBS} libkauth.a
 kdb.o: kdb.c AFS_component_version_number.o
 
 krb_udp.o: krb_udp.c kaserver.h kautils.h kauth.h prot.h ${TOP_INCDIR}/lwp.h AFS_component_version_number.o
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 krb_udp: krb_udp.o libkauth.a $(KLIBS)
        ${CC} ${LDFLAGS} -o krb_udp krb_udp.o libkauth.a $(KLIBS)
 
+ka-forwarder.o: ka-forwarder.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 ka-forwarder: ka-forwarder.o
        ${CC} -o $@ ${CFLAGS} ka-forwarder.o ${LIBS} ${XLIBS}
 
index 850603f..2efb27d 100644 (file)
@@ -13,7 +13,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
 CC = ${MT_CC}
-CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS}
+CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS} ${CFLAGS_NOERROR}
 CCRULE = ${CC} ${CFLAGS} -c $?
 
 BOZO = ../../bozo
@@ -49,7 +49,8 @@ libbosadmin.a: ${LIBOBJS}
        $(AR) crv $@ ${LIBOBJS}
        ${RANLIB} $@
 
-afs_bosAdmin.o: afs_bosAdmin.h
+afs_bosAdmin.o: afs_bosAdmin.c afs_bosAdmin.h
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 bosint.xdr.o: ${BOZO}/bosint.xdr.c
        ${CCRULE}
index bd438aa..2a0f2e4 100644 (file)
@@ -52,7 +52,8 @@ libkasadmin.a: ${LIBOBJS}
        $(AR) crv $@ ${LIBOBJS}
        ${RANLIB} $@
 
-afs_kasAdmin.o: afs_kasAdmin.h
+afs_kasAdmin.o: afs_kasAdmin.c afs_kasAdmin.h
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 kauth.cs.o: ../../kauth/kauth.cs.c
        ${CCRULE}
index 93d1174..5da0cef 100644 (file)
@@ -110,6 +110,15 @@ rxstat_query_peer: rxstat_query_peer.o $(SAMPLELIBS)
 rxstat_query_process: rxstat_query_process.o $(SAMPLELIBS)
        $(CC) $(LDFLAGS) -o $@ $@.o $(SAMPLELIBS) $(MT_LIBS) $(XLIBS)
 
+#
+# Errors
+#
+rxstat_query_peer.o: rxstat_query_peer.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
+rxstat_query_process.o: rxstat_query_process.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 #######################################################################
 all test tests: $(SAMPLEPROGS)
 
index 0b18975..16e3d2c 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+ # pragma GCC diagnostic warning "-Wformat"
+#endif
+
 
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
index 0cd0345..79b4502 100644 (file)
@@ -38,6 +38,9 @@ AFSCPOBJS =\
        util.o \
        vos.o
 
+client.o: client.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 afscp: afscp.o $(AFSCPOBJS) $(AFSCPLIBS)
        $(CC) $(CFLAGS) -o afscp afscp.o $(AFSCPOBJS) \
        -L${TOP_LIBDIR} $(AFSCPLIBS) ${MT_LIBS} $(XLIBS)
index 321aa38..b42a99c 100644 (file)
@@ -85,7 +85,7 @@ afscbint.xdr.o: ${FSINT}/afscbint.xdr.c
        ${CCRULE}
 
 afsint.xdr.o: ${FSINT}/afsint.xdr.c
-       ${CCRULE}
+       ${CCRULE} @CFLAGS_NOERROR@
 
 clean:
        $(RM) -f *.o libvosadmin*
index 6b11521..f6f615e 100644 (file)
@@ -152,7 +152,7 @@ client.o: ${KAUTH}/client.c
        ${CCRULE}
 
 authclient.o: ${KAUTH}/authclient.c
-       ${CCRULE}
+       ${CCRULE} @CFLAGS_NOERROR@
 
 token.o: ${KAUTH}/token.c
        ${CCRULE}
index e8eeeac..50c8aa1 100644 (file)
@@ -158,7 +158,7 @@ rx_pthread.o: ${RX}/rx_pthread.c
        ${CCRULE} ${RX}/rx_pthread.c
 
 rx.o: ${RX}/rx.c
-       ${CCRULE} ${RX}/rx.c
+       ${CCRULE} @CFLAGS_NOERROR@ ${RX}/rx.c
 
 rx_conncache.o: ${RX}/rx_conncache.c
        ${CCRULE} ${RX}/rx_conncache.c
@@ -193,16 +193,16 @@ rxkad_client.o: ${RXKAD}/rxkad_client.c
        ${CCRULE} ${RXKAD}/rxkad_client.c
 
 rxkad_server.o: ${RXKAD}/rxkad_server.c
-       ${CCRULE} ${RXKAD}/rxkad_server.c
+       ${CCRULE} @CFLAGS_NOERROR@ ${RXKAD}/rxkad_server.c
 
 rxkad_common.o: ${RXKAD}/rxkad_common.c
        ${CCRULE} ${RXKAD}/rxkad_common.c
 
 ticket.o: ${RXKAD}/ticket.c
-       ${CCRULE} ${RXKAD}/ticket.c
+       ${CCRULE} @CFLAGS_NOERROR@ ${RXKAD}/ticket.c
 
 ticket5.o: ${RXKAD}/ticket5.c
-       ${CCRULE} ${RXKAD}/ticket5.c
+       ${CCRULE} @CFLAGS_NOERROR@ ${RXKAD}/ticket5.c
 
 crc.o: ${RXKAD}/crc.c
        ${CCRULE} ${RXKAD}/crc.c
@@ -401,7 +401,7 @@ afsint.cs.o: ${TOP_OBJDIR}/src/fsint/afsint.cs.c
        ${CCRULE} ${TOP_OBJDIR}/src/fsint/afsint.cs.c
 
 afsint.xdr.o: ${TOP_OBJDIR}/src/fsint/afsint.xdr.c
-       ${CCRULE} ${TOP_OBJDIR}/src/fsint/afsint.xdr.c
+       ${CCRULE} @CFLAGS_NOERROR@ ${TOP_OBJDIR}/src/fsint/afsint.xdr.c
 
 afscbint.cs.o: ${TOP_OBJDIR}/src/fsint/afscbint.cs.c
        ${CCRULE} ${TOP_OBJDIR}/src/fsint/afscbint.cs.c
index e455766..d6f777d 100644 (file)
@@ -736,7 +736,7 @@ $(UOBJ)/rx_packet.o: $(TOP_SRC_RX)/rx_packet.c
 $(UOBJ)/rx_conncache.o: $(TOP_SRCDIR)/rx/rx_conncache.c
        $(CRULE1)
 $(UOBJ)/xdr_rx.o: $(TOP_SRC_RX)/xdr_rx.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(UOBJ)/xdr_int32.o: $(TOP_SRC_RX)/xdr_int32.c
        $(CRULE1)
 $(UOBJ)/xdr_int64.o: $(TOP_SRC_RX)/xdr_int64.c
@@ -758,7 +758,7 @@ $(UOBJ)/osi_groups.o: $(TOP_SRC_AFS)/UKERNEL/osi_groups.c
 $(UOBJ)/Kcallback.ss.o: $(TOP_OBJ_FSINT)/Kcallback.ss.c
        $(CRULE1)
 $(UOBJ)/Kvice.xdr.o: $(TOP_OBJ_FSINT)/Kvice.xdr.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(UOBJ)/Kvice.cs.o: $(TOP_OBJ_FSINT)/Kvice.cs.c
        $(CRULE1)
 $(UOBJ)/afsaux.o: $(TOP_SRC_FSINT)/afsaux.c
@@ -782,13 +782,13 @@ $(UOBJ)/afs_icl.o: $(TOP_SRC_AFS)/afs_icl.c
 $(UOBJ)/afs_pioctl.o: $(TOP_SRC_AFS)/afs_pioctl.c
        $(CRULE1) -DAFS_NONFSTRANS
 $(UOBJ)/afs_syscall.o: $(TOP_SRC_AFS)/afs_syscall.c
-       $(CRULE1) -DAFS_NONFSTRANS
+       $(CRULE1) @CFLAGS_NOERROR@ -DAFS_NONFSTRANS
 $(UOBJ)/osi_vfsops.o: $(TOP_SRC_AFS)/UKERNEL/osi_vfsops.c
        $(CRULE1) -DAFS_NONFSTRANS
 $(UOBJ)/ktc.o:         $(TOP_SRCDIR)/auth/ktc.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(UOBJ)/ticket.o: $(TOP_SRCDIR)/rxkad/ticket.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(UOBJ)/rxkad_server.o: $(TOP_SRCDIR)/rxkad/rxkad_server.c
        $(CRULE1)
 $(UOBJ)/ptint.cs.o: $(TOP_OBJDIR)/src/ptserver/ptint.cs.c
@@ -806,7 +806,7 @@ $(UOBJ)/ubik_int.cs.o: $(TOP_OBJDIR)/src/ubik/ubik_int.cs.c
 $(UOBJ)/ubik_int.xdr.o: $(TOP_OBJDIR)/src/ubik/ubik_int.xdr.c
        $(CRULE1)
 $(UOBJ)/authclient.o: $(TOP_SRCDIR)/kauth/authclient.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(UOBJ)/kalocalcell.o: $(TOP_SRCDIR)/kauth/kalocalcell.c
        $(CRULE1)
 $(UOBJ)/client.o: $(TOP_SRCDIR)/kauth/client.c
@@ -1001,7 +1001,7 @@ $(WEBOBJ)/rx_packet.o: $(TOP_SRC_RX)/rx_packet.c
 $(WEBOBJ)/rx_conncache.o: $(TOP_SRCDIR)/rx/rx_conncache.c
        $(CRULE2)
 $(WEBOBJ)/xdr_rx.o: $(TOP_SRC_RX)/xdr_rx.c
-       $(CRULE2)
+       $(CRULE2) @CFLAGS_NOERROR@
 $(WEBOBJ)/afs_usrops.o: $(TOP_SRC_AFS)/UKERNEL/afs_usrops.c
        $(CRULE2)
 $(WEBOBJ)/afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
@@ -1019,7 +1019,7 @@ $(WEBOBJ)/osi_groups.o: $(TOP_SRC_AFS)/UKERNEL/osi_groups.c
 $(WEBOBJ)/Kcallback.ss.o: $(TOP_OBJ_FSINT)/Kcallback.ss.c
        $(CRULE2)
 $(WEBOBJ)/Kvice.xdr.o: $(TOP_OBJ_FSINT)/Kvice.xdr.c
-       $(CRULE2)
+       $(CRULE2) @CFLAGS_NOERROR@
 $(WEBOBJ)/Kvice.cs.o: $(TOP_OBJ_FSINT)/Kvice.cs.c
        $(CRULE2)
 $(WEBOBJ)/afsaux.o: $(TOP_SRC_FSINT)/afsaux.c
@@ -1043,20 +1043,20 @@ $(WEBOBJ)/afs_icl.o: $(TOP_SRC_AFS)/afs_icl.c
 $(WEBOBJ)/afs_pioctl.o: $(TOP_SRC_AFS)/afs_pioctl.c
        $(CRULE2) -DAFS_NONFSTRANS
 $(WEBOBJ)/afs_syscall.o: $(TOP_SRC_AFS)/afs_syscall.c
-       $(CRULE2) -DAFS_NONFSTRANS
+       $(CRULE2) @CFLAGS_NOERROR@ -DAFS_NONFSTRANS
 $(WEBOBJ)/osi_vfsops.o: $(TOP_SRC_AFS)/UKERNEL/osi_vfsops.c
        $(CRULE2) -DAFS_NONFSTRANS
 $(WEBOBJ)/ktc.o:       $(TOP_SRCDIR)/auth/ktc.c
-       $(CRULE2)
+       $(CRULE2) @CFLAGS_NOERROR@
 $(WEBOBJ)/ktc.krb.o:   $(TOP_SRCDIR)/auth/ktc.c
-       $(CRULE2) -DAFS_KERBEROS_ENV -DMAYBE_NO_KTC 
+       $(CRULE2) -DAFS_KERBEROS_ENV -DMAYBE_NO_KTC @CFLAGS_NOERROR@
        mv ktc.o ktc.krb.o
 $(WEBOBJ)/securehash.o: $(TOP_SRCDIR)/afsweb/securehash.c
        $(CRULE2)
 $(WEBOBJ)/nsafs.o: $(TOP_SRCDIR)/afsweb/nsafs.c
        $(CRULE2)
 $(WEBOBJ)/ticket.o: $(TOP_SRCDIR)/rxkad/ticket.c
-       $(CRULE2)
+       $(CRULE2) @CFLAGS_NOERROR@
 $(WEBOBJ)/rxkad_server.o: $(TOP_SRCDIR)/rxkad/rxkad_server.c
        $(CRULE2)
 $(WEBOBJ)/ptint.cs.o: $(TOP_OBJDIR)/src/ptserver/ptint.cs.c
@@ -1074,7 +1074,7 @@ $(WEBOBJ)/ubik_int.cs.o: $(TOP_OBJDIR)/src/ubik/ubik_int.cs.c
 $(WEBOBJ)/ubik_int.xdr.o: $(TOP_OBJDIR)/src/ubik/ubik_int.xdr.c
        $(CRULE2)
 $(WEBOBJ)/authclient.o: $(TOP_SRCDIR)/kauth/authclient.c
-       $(CRULE2)
+       $(CRULE2) @CFLAGS_NOERROR@
 $(WEBOBJ)/kalocalcell.o: $(TOP_SRCDIR)/kauth/kalocalcell.c
        $(CRULE2)
 $(WEBOBJ)/client.o: $(TOP_SRCDIR)/kauth/client.c
@@ -1270,7 +1270,7 @@ $(JUAFS)/rx_packet.o: $(TOP_SRC_RX)/rx_packet.c
 $(JUAFS)/rx_conncache.o: $(TOP_SRCDIR)/rx/rx_conncache.c
        $(CRULE1)
 $(JUAFS)/xdr_rx.o: $(TOP_SRC_RX)/xdr_rx.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(JUAFS)/xdr_int64.o: $(TOP_SRC_RX)/xdr_int64.c
        $(CRULE1)
 $(JUAFS)/afs_usrops.o: $(TOP_SRC_AFS)/UKERNEL/afs_usrops.c
@@ -1290,7 +1290,7 @@ $(JUAFS)/osi_groups.o: $(TOP_SRC_AFS)/UKERNEL/osi_groups.c
 $(JUAFS)/Kcallback.ss.o: $(TOP_OBJ_FSINT)/Kcallback.ss.c
        $(CRULE1)
 $(JUAFS)/Kvice.xdr.o: $(TOP_OBJ_FSINT)/Kvice.xdr.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(JUAFS)/Kvice.cs.o: $(TOP_OBJ_FSINT)/Kvice.cs.c
        $(CRULE1)
 $(JUAFS)/afsaux.o: $(TOP_SRC_FSINT)/afsaux.c
@@ -1312,13 +1312,13 @@ $(JUAFS)/afs_icl.o: $(TOP_SRC_AFS)/afs_icl.c
 $(JUAFS)/afs_pioctl.o: $(TOP_SRC_AFS)/afs_pioctl.c
        $(CRULE1) -DAFS_NONFSTRANS
 $(JUAFS)/afs_syscall.o: $(TOP_SRC_AFS)/afs_syscall.c
-       $(CRULE1) -DAFS_NONFSTRANS
+       $(CRULE1) @CFLAGS_NOERROR@ -DAFS_NONFSTRANS
 $(JUAFS)/osi_vfsops.o: $(TOP_SRC_AFS)/UKERNEL/osi_vfsops.c
        $(CRULE1) -DAFS_NONFSTRANS
 $(JUAFS)/ktc.o:        $(TOP_SRCDIR)/auth/ktc.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(JUAFS)/ticket.o: $(TOP_SRCDIR)/rxkad/ticket.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(JUAFS)/rxkad_server.o: $(TOP_SRCDIR)/rxkad/rxkad_server.c
        $(CRULE1)
 $(JUAFS)/ptint.cs.o: $(TOP_OBJDIR)/src/ptserver/ptint.cs.c
@@ -1336,7 +1336,7 @@ $(JUAFS)/ubik_int.cs.o: $(TOP_OBJDIR)/src/ubik/ubik_int.cs.c
 $(JUAFS)/ubik_int.xdr.o: $(TOP_OBJDIR)/src/ubik/ubik_int.xdr.c
        $(CRULE1)
 $(JUAFS)/authclient.o: $(TOP_SRCDIR)/kauth/authclient.c
-       $(CRULE1)
+       $(CRULE1) @CFLAGS_NOERROR@
 $(JUAFS)/kalocalcell.o: $(TOP_SRCDIR)/kauth/kalocalcell.c
        $(CRULE1)
 $(JUAFS)/client.o: $(TOP_SRCDIR)/kauth/client.c
index a55177a..cbd631f 100644 (file)
@@ -94,6 +94,7 @@ ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS)
        $(CC) ${CFLAGS} -o ptserver ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o map.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libaudit.a
 
 ptserver.o: ptserver.c ${INCLS} AFS_component_version_number.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 ptutils.o: ptutils.c ${INCLS}
 
index 0b000f6..9ca071b 100644 (file)
@@ -62,7 +62,8 @@ librxkad.a: ${OBJS} AFS_component_version_number.o
 
 rxkad_client.o: fcrypt.h private_data.h rxkad_client.c ${INCLS}
 
-rxkad_server.o: fcrypt.h private_data.h rxkad_server.c ${INCLS}
+rxkad_server.o: rxkad_server.c fcrypt.h private_data.h  ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 rxkad_common.o: fcrypt.h private_data.h rxkad_common.c ${INCLS}
 
@@ -73,8 +74,10 @@ rxkad_errs.c rxkad.h: rxkad_errs.et rxkad.p.h
        ${COMPILE_ET} -p ${srcdir} rxkad_errs -h rxkad
 
 ticket.o: ticket.c lifetimes.h ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 ticket5.o: ticket5.c v5gen.c v5der.c v5gen-rewrite.h ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 
 crc.o: crc.c ${INCLS}
 
index b749078..4c01394 100644 (file)
@@ -59,16 +59,16 @@ LIBS=${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/util.
 all: fileserver state_analyzer
 
 rx_pthread.o: ${RX}/rx_pthread.c
-       ${CCRULE} -DDPF_FSLOG
+       ${CCRULE} @CFLAGS_NOERROR@ -DDPF_FSLOG
 
 viced.o: ${VICED}/viced.c
        ${CCRULE}
 
 afsfileprocs.o: ${VICED}/afsfileprocs.c
-       ${CCRULE}
+       ${CCRULE} @CFLAGS_NOERROR@
 
 host.o: ${VICED}/host.c
-       ${CCRULE}
+       ${CCRULE} @CFLAGS_NOERROR@
 
 physio.o: ${VICED}/physio.c
        ${CCRULE}
@@ -198,7 +198,7 @@ afsint.ss.o: ${FSINT}/afsint.ss.c
        ${CCRULE}
 
 afsint.xdr.o: ${FSINT}/afsint.xdr.c
-       ${CCRULE}
+       ${CCRULE} @CFLAGS_NOERROR@
 
 state_analyzer.o: state_analyzer.c
        ${CCRULE}
index 443c4b1..fd73778 100644 (file)
@@ -75,6 +75,8 @@ Kubik_int.h: ubik_int.xg
        ${RXGEN} -A -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
 
 utst_int.ss.o: utst_int.ss.c utst_int.xdr.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 utst_int.cs.o: utst_int.cs.c utst_int.xdr.c
 utst_int.xdr.o: utst_int.xdr.c utst_int.h
 
@@ -114,7 +116,12 @@ libubik.a: ${LIBOBJS} AFS_component_version_number.o
 disk.o: disk.c ${INCLS}
 uinit.o: uinit.c ${INCLS}
 remote.o: remote.c ${INCLS}
+
+# beacon.c uses signed and unsigned interchangably for IP addresses. Fixing
+# will require changing the Ubik API
 beacon.o: beacon.c ${INCLS}
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 lock.o: lock.c ${INCLS}
 recovery.o: recovery.c ${INCLS}
 ubik.o: ubik.c ${INCLS}
index df48738..a286b67 100644 (file)
@@ -14,6 +14,9 @@
 #include <afs/param.h>
 #endif
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wstrict-prototypes"
+#endif
 
 #if defined(UKERNEL)
 #include "afs/sysincludes.h"
index 2fed610..20fca39 100644 (file)
@@ -60,7 +60,7 @@ uss_common.o : uss_common.c
        ${CC} -c ${CFLAGS} ${srcdir}/uss_common.c
 
 uss_vol.o : uss_vol.c
-       ${CC} -c ${CFLAGS} ${srcdir}/uss_vol.c
+       ${CC} -c ${CFLAGS} @CFLAGS_NOERROR@ ${srcdir}/uss_vol.c
 
 uss_acl.o : uss_acl.c
        ${CC} -c ${CFLAGS} ${srcdir}/uss_acl.c
@@ -69,13 +69,13 @@ uss_ptserver.o : uss_ptserver.c
        ${CC} -c ${CFLAGS} ${srcdir}/uss_ptserver.c
 
 uss_kauth.o : uss_kauth.c
-       ${CC} -c ${CFLAGS} ${srcdir}/uss_kauth.c
+       ${CC} -c ${CFLAGS} @CFLAGS_NOERROR@ ${srcdir}/uss_kauth.c
 
 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} lex.yy.c
+       ${CC} -c ${CFLAGS} @CFLAGS_NOERROR@ lex.yy.c
 
 lex.yy.c : lex.l
        ${LEX} ${srcdir}/lex.l
index 81d1ae9..ad587ed 100644 (file)
@@ -87,7 +87,7 @@ fileserver: ${objects} ${headers} ${LIBS}
        esac
 
 fsprobe.o: fsprobe.c AFS_component_version_number.c
-       ${CC} ${CFLAGS} -DINTERPRET_DUMP -c ${srcdir}/fsprobe.c
+       ${CC} ${CFLAGS} @CFLAGS_NOERROR@ -DINTERPRET_DUMP -c ${srcdir}/fsprobe.c
 
 fsprobe: fsprobe.o
        ${CC} ${CFLAGS} -o fsprobe fsprobe.o ${LIBS} ${XLIBS} 
index be4a15f..b4c5d70 100644 (file)
@@ -126,6 +126,8 @@ vl_errors.o: vl_errors.c
 vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
        $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
 
+vlserver.o: vlserver.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
 system: install
 
 install: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \
index cefd232..1afeabd 100644 (file)
@@ -180,6 +180,9 @@ vol-salvage.o vutil.o: volinodes.h
 vol-salvage.o salvager.o: vol-salvage.h
 vol-salvage.o: salvsync.h daemon_com.h
 
+salvager.o: salvager.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 vlib.a:        ${VLIBOBJS} AFS_component_version_number.o
        $(RM) -f $@
        $(AR) crv $@ ${VLIBOBJS} AFS_component_version_number.o
index 872dd4d..a915dc6 100644 (file)
@@ -136,6 +136,12 @@ lockprocs.o: lockprocs.c ${VINCLS} ${INTINCLS} ${RINCLS}
 vol_split.o: vol_split.c ${VINCLS} ${INTINCLS} ${RINCLS}
 
 #
+# Errors
+#
+vos.o: vos.c
+       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
+#
 # Installation targets
 #
 install: restorevol voldump volser.h volint.h vos volserver libvolser.a
index 78eab6f..cb76728 100644 (file)
@@ -17,6 +17,9 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wformat"
+#endif
 
 #include <ctype.h>
 #include <errno.h>
index 298be88..0105608 100644 (file)
@@ -10,6 +10,9 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wformat-extra-args"
+#endif
 
 #include <stdio.h>
 #include <sys/types.h>