mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
Inhibit -Wstrict-prototypes warnings via CFLAGS
Currently, we inhibit various -Wstrict-prototypes warnings via "#pragma GCC diagnostic warning". Some older compilers (like gcc 4.1 on RHEL5) don't understand the pragma, but still need the warning inhibited in order to build with --enable-checking. So just inhibit this warning via command-line CFLAGS instead of using #pragma directives. Change-Id: If5b37cba460bc243dbaeadc6305908aed0ad34d4 Reviewed-on: https://gerrit.openafs.org/15219 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
parent
20e996af4e
commit
2a9550a830
@ -10,10 +10,6 @@
|
||||
#ifndef AFSD_AFSD_H
|
||||
#define AFSD_AFSD_H
|
||||
|
||||
#ifdef IGNORE_SOME_GCC_WARNINGS
|
||||
# pragma GCC diagnostic warning "-Wstrict-prototypes"
|
||||
#endif
|
||||
|
||||
extern int afsd_debug;
|
||||
extern int afsd_verbose;
|
||||
extern char *afsd_cacheMountDir;
|
||||
|
@ -91,6 +91,7 @@ volstub.o: bc.h
|
||||
# Errors
|
||||
#
|
||||
CFLAGS_commands.o=@CFLAGS_NOERROR@
|
||||
CFLAGS_ubik_db_if.o=@CFLAGS_NOSTRICT_PROTOTYPES@
|
||||
|
||||
#
|
||||
# Install targets
|
||||
|
@ -13,11 +13,6 @@
|
||||
#include <afs/stds.h>
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#ifdef IGNORE_SOME_GCC_WARNINGS
|
||||
# pragma GCC diagnostic warning "-Wstrict-prototypes"
|
||||
#endif
|
||||
|
||||
#include <afs/cmd.h>
|
||||
#include <afs/auth.h>
|
||||
#include <afs/cellconfig.h>
|
||||
|
@ -619,6 +619,7 @@ CFLAGS_NOOLDSTYLE=
|
||||
CFLAGS_NOIMPLICIT_FALLTHROUGH=
|
||||
CFLAGS_NOCAST_FUNCTION_TYPE=
|
||||
CFLAGS_NODANGLING_POINTER=
|
||||
CFLAGS_NOSTRICT_PROTOTYPES=
|
||||
XCFLAGS_NOCHECKING="$XCFLAGS"
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
@ -635,6 +636,7 @@ if test "x$GCC" = "xyes"; then
|
||||
CFLAGS_NOERROR="-Wno-error"
|
||||
CFLAGS_NOUNUSED="-Wno-unused"
|
||||
CFLAGS_NOOLDSTYLE="-Wno-old-style-definition"
|
||||
CFLAGS_NOSTRICT_PROTOTYPES=-Wno-strict-prototypes
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-implicit-fallthrough],
|
||||
[CFLAGS_NOIMPLICIT_FALLTHROUGH], [-Werror])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-dangling-pointer],
|
||||
@ -736,6 +738,7 @@ AC_SUBST(CFLAGS_NOOLDSTYLE)
|
||||
AC_SUBST(CFLAGS_NOIMPLICIT_FALLTHROUGH)
|
||||
AC_SUBST(CFLAGS_NOCAST_FUNCTION_TYPE)
|
||||
AC_SUBST(CFLAGS_NODANGLING_POINTER)
|
||||
AC_SUBST(CFLAGS_NOSTRICT_PROTOTYPES)
|
||||
AC_SUBST(CFLAGS_WERROR)
|
||||
AC_SUBST(XCFLAGS64)
|
||||
AC_SUBST(XLDFLAGS)
|
||||
|
@ -131,6 +131,8 @@ kautils.h: kaerrors.et kautils.p.h
|
||||
${COMPILE_ET_H} -p ${srcdir} kaerrors -h kautils
|
||||
|
||||
admin_tools.o admin_tools.lo: kautils.h
|
||||
CFLAGS_authclient.o=@CFLAGS_NOSTRICT_PROTOTYPES@
|
||||
CFLAGS_authclient.lo=@CFLAGS_NOSTRICT_PROTOTYPES@
|
||||
authclient.o authclient.lo: kautils.h
|
||||
client.o client.lo: kautils.h
|
||||
decode_ticket.o decode_ticket.lo: kautils.h
|
||||
@ -185,6 +187,7 @@ libkauth.krb.a: $(KRB_objs)
|
||||
|
||||
kas.o: kas.c ${INCLS} AFS_component_version_number.o
|
||||
|
||||
CFLAGS_admin_tools.o=@CFLAGS_NOSTRICT_PROTOTYPES@
|
||||
admin_tools.o: admin_tools.c ${INCLS} kaport.h
|
||||
|
||||
kkids.o: kkids.c ${INCLS}
|
||||
|
@ -16,10 +16,6 @@
|
||||
#include <afs/param.h>
|
||||
#include <afs/stds.h>
|
||||
|
||||
#ifdef IGNORE_SOME_GCC_WARNINGS
|
||||
# pragma GCC diagnostic warning "-Wstrict-prototypes"
|
||||
#endif
|
||||
|
||||
#include <roken.h>
|
||||
#include <afs/opr.h>
|
||||
#include <afs/opr_assert.h>
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <afs/opr.h>
|
||||
|
||||
#ifdef IGNORE_SOME_GCC_WARNINGS
|
||||
# pragma GCC diagnostic warning "-Wstrict-prototypes"
|
||||
# pragma GCC diagnostic warning "-Wimplicit-function-declaration"
|
||||
#endif
|
||||
|
||||
|
@ -46,6 +46,7 @@ libkasadmin.a: ${LIBOBJS}
|
||||
$(AR) $(ARFLAGS) $@ ${LIBOBJS}
|
||||
${RANLIB} $@
|
||||
|
||||
CFLAGS_afs_kasAdmin.o=@CFLAGS_NOSTRICT_PROTOTYPES@
|
||||
afs_kasAdmin.o: afs_kasAdmin.c afs_kasAdmin.h
|
||||
|
||||
kauth.cs.o: ../../kauth/kauth.cs.c
|
||||
|
@ -13,10 +13,6 @@
|
||||
#include <afs/param.h>
|
||||
#include <afs/stds.h>
|
||||
|
||||
#ifdef IGNORE_SOME_GCC_WARNINGS
|
||||
# pragma GCC diagnostic warning "-Wstrict-prototypes"
|
||||
#endif
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#include <rx/rx.h>
|
||||
|
@ -110,6 +110,7 @@ tcstatus.o: ${BUTC}/tcstatus.c ${BUTCINCLS}
|
||||
butc_xbsa.o: ${BUTC}/butc_xbsa.c ${BUTC}/butc_xbsa.h ${BUTCINCLS}
|
||||
$(AFS_CCRULE) ${BUTC}/butc_xbsa.c
|
||||
|
||||
CFLAGS_ubik_db_if.o=@CFLAGS_NOSTRICT_PROTOTYPES@
|
||||
ubik_db_if.o: ${BUCOORD}/ubik_db_if.c
|
||||
$(AFS_CCRULE) ${BUCOORD}/ubik_db_if.c
|
||||
|
||||
|
@ -133,6 +133,8 @@ phys.o phys.lo: ubik.h
|
||||
recovery.o recovery.lo: ubik.h
|
||||
remote.o remote.lo: ubik.h
|
||||
ubik.o ubik.lo: ubik.h
|
||||
CFLAGS_ubikclient.o=@CFLAGS_NOSTRICT_PROTOTYPES@
|
||||
CFLAGS_ubikclient.lo=@CFLAGS_NOSTRICT_PROTOTYPES@
|
||||
ubikclient.o ubikclient.lo: ubik.h
|
||||
ubikcmd.o ubikcmd.lo: ubik.h
|
||||
udebug.o udebug.lo: ubik.h
|
||||
|
@ -17,10 +17,6 @@
|
||||
# include <opr/lock.h>
|
||||
#endif
|
||||
|
||||
#ifdef IGNORE_SOME_GCC_WARNINGS
|
||||
# pragma GCC diagnostic warning "-Wstrict-prototypes"
|
||||
#endif
|
||||
|
||||
#include <afs/pthread_glock.h>
|
||||
#include <rx/xdr.h>
|
||||
#include <rx/rx.h>
|
||||
|
Loading…
Reference in New Issue
Block a user