1 OpenAFS Warning detection
2 -------------------------
4 There's been a concerted effort over the last few years, by many developers,
5 to reduce the number of warnings in the OpenAFS tree. In an attempt to
6 prevent warnings from creeping back in, we now have the ability to break the
7 build when new warnings appear.
9 This is only available for systems with gcc 4.2 or later, and is disabled
10 unless the --enable-checking option is supplied to configure. Because we
11 can't remove all of the warnings, we permit file by file (and warning by
12 warning) disabling of specific warnings. The --enable-checking=all prevents
13 this, and errors for any file containing a warning.
18 If warnings are unavoidable in a particular part of the build, they may be
19 disabled in an number of ways.
21 You can disable a single warning type in a particular file by using GCC
22 pragmas. If a warning can be disabled with a pragma, then the switch to use
23 will be listed in the error message you receive from the compiler. Pragmas
24 should be wrapped in IGNORE_SOME_GCC_WARNINGS, so that they aren't used
25 with non-gcc compilers, and can be disabled if desired. For example:
26 #ifdef IGNORE_SOME_GCC_WARNINGS
27 # pragma GCC diagnostic warning "-Wold-style-definition"
30 If a pragma isn't available for your particular warning, you will need to
31 disable all warnings for the file in question. You can do this by supplying
32 the autoconf macro @CFLAGS_NOERROR@ in the build options for the file. For
34 lex.yy.o : lex.yy.c y.tab.c
35 ${CC} -c ${CFLAGS} @CFLAGS_NOERROR@ lex.yy.c
37 If you add a new warning inhibition, please also add it to the list below.
42 afs/afs_syscall.c : old-style
44 : all (ukernel) : syscall pointer issues
45 afsd/afsd.c : deprecated : daemon() marked as deprecated on Darwin
46 : all : call_syscall missing prototype
47 auth/ktc.c : all (ukernel) : call_syscall doesn't have a prototype
48 bozo/bosserver.c : deprecated : daemon() marked as deprecated on Darwin
49 bozo/bos.c : all : DES key types & string consts
50 bozo/bos_util.c : all : DES key types
51 bucoord/ubik_db_if.c : strict-proto : Ubik_Call
52 bucoord/commands.c : all : Ubik_Call
53 : signed vs unsigned for dates
54 budb/server.c : all : ExtendedCellInfo
55 butc/tcmain.c : all : prototypes / signed warnings (XXX)
56 butc/recoverDb.c : all : pointer target issues (XXX)
57 butc/tcudbprocs.c : all : ubik_Call
58 comerr/error_table.c : all : Autogenerated file with unused labels
59 kauth/kaserver.c : all : ExtendedCellInfo
60 kauth/admin_tools.c : all : ubik_Call nonsense
61 kauth/authclient.c : strict-proto : ubik_Call nonsense
62 : all : ubik_Call nonsense
63 libadmin/bos/afs_bosAdmin.c: all : DES keys, time types, and const
64 libadmin/kas/afs_kasAdmin.c: all : Ubik_Call nonsense, DES keys
65 libadmin/samples/rxstat_query_peer.c : all : util_RPCStatsStateGet types
66 libadmin/samples/rxstat_query_process.c : all : util_RPCStatsStateGet types
67 libadmin/test/client.c : all : util_RPCStatsStateGet types
68 ptserver/ptserver.c : all : ExtendedCellInfo
69 rxkad/rxkad_server.c : all : Des key nonsense
70 rxkad/ticket5.c : all : CRC functions
71 rx/rx.c : all (pthread) : rxkad_global_stats_init not proto'd
72 rx/xdr_rx.c : all (ukernel) : Prototypes don't match due to AFS_XDR_T
73 not being used in the xdr header
74 ubik/utst_int_ss.c : all : Client / Server symbol collisions
75 ubik/beacon.c : all : Ubik uses signed/unsigned
76 interchangably for IP addresses, a
77 fix will require API changes.
78 ubik/ubikclient.c : strict-protos : ubik_Call
79 uss/uss_vol.c : all Format issues
80 uss/uss_kauth.c : all : Des keys, ubik_Call
81 uss/lex.yy.c : all : Unused symbols
82 viced/fsprobe.c : all : ubik_Call
83 vlserver/vlserver.c : all : GetExtendedCellInfo
84 vol/salvager.c : all : consts & undefined variable from header
85 volser/vos.c : all : ubik_Call_New
86 volser/vol-dump.c : format : afs_sfsize_t