ee7754bdbe971ecb1c1ab299760005a900dac599
[openafs.git] / README.WARNINGS
1 OpenAFS Warning detection
2 -------------------------
3
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.
8
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.
14
15 Disabling warnings
16 ------------------
17
18 If warnings are unavoidable in a particular part of the build, they may be
19 disabled in an number of ways.
20
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"
28   #endif
29
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 
33 example:
34   lex.yy.o : lex.yy.c y.tab.c
35          ${CC} -c ${CFLAGS} @CFLAGS_NOERROR@ lex.yy.c
36
37 If you add a new warning inhibition, please also add it to the list below.
38
39 Inhibited warnings
40 ------------------
41
42 afs/afs_syscall.c    : old-style
43                      : strict-proto
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/bosoprocs.c     : all           : ExtendedCellInfo and des key types
50 bozo/bos.c           : all           : DES key types & string consts 
51 bozo/bos_util.c      : all           : DES key types
52 bubasics/bumon.ss.c  : all           : BC_Print collision betwen client & server
53 bucoord/ubik_db_if.c : strict-proto  : Ubik_Call
54                      : all           : Public version of volser_prototypes req
55 bucoord/volstub.c    : all           : Public version of volser_prototypes req
56 bucoord/commands.c   : all           : Ubik_Call
57                                      : signed vs unsigned for dates
58 budb/server.c        : all           : ExtendedCellInfo
59 butc/lwps.c          : all           : Public version of volser_prototypes req
60 butc/tcmain.c        : all           : prototypes / signed warnings (XXX)
61 butc/recoverDb.c     : all           : pointer target issues (XXX)
62 butc/tcudbprocs.c    : all           : ubik_Call
63 butc/dump.c          : all           : pointer types (XXX)
64 comerr/error_table.c : all           : Autogenerated file with unused labels
65 fsint/afsint.xdr.c   : all           : rxgen opaque vectors problem
66 fsprobe/fsprobe.c    : all           : Public version of volser_prototypes req
67 kauth/kaprocs.c      : all           : XXX
68 kauth/kaserver.c     : all           : ExtendedCellInfo
69 kauth/krb_udp.c      : all           : XXX
70 kauth/admin_tools.c  : all           : ubik_Call nonsense
71 kauth/authclient.c   : strict-proto  : ubik_Call nonsense
72                      : implicit-func : ubik_Call nonsense
73 kauth/kas.c          : all           : XXX
74 kauth/klog.c         : all           : XXX
75 kauth/ka-forwarder.c : all           : XXX
76 libadmin/bos/afs_bosAdmin.c: all     : DES keys, time types, and const
77 libadmin/kas/afs_kasAdmin.c: all     : Ubik_Call nonsense, DES keys
78 libadmin/samples/rxstat_query_peer.c : all : util_RPCStatsStateGet types
79 libadmin/samples/rxstat_query_process.c : all : util_RPCStatsStateGet types
80 libadmin/samples/rxdebug_peers.c : format : struct clock vs unsigned int
81 libadmin/test/client.c : all         : util_RPCStatsStateGet types
82 ptserver/ptserver.c  : all           : ExtendedCellInfo
83 rxkad/rxkad_server.c : all           : Des key nonsense
84 rxkad/ticket5.c      : implicit-func : CRC functions
85 rx/rx.c              : all (pthread) : rxkad_global_stats_init not proto'd
86 rx/xdr_rx.c          : all (ukernel) : Prototypes don't match due to AFS_XDR_T 
87                                        not being used in the xdr header
88 ubik/utst_int_ss.c   : all           : Client / Server symbol collisions
89 ubik/beacon.c        : all           : Ubik uses signed/unsigned 
90                                        interchangably for IP addresses, a 
91                                        fix will require API changes.
92 ubik/ubikclient.c    : strict-protos : ubik_Call
93 uss/uss_vol.c        : all           : Public version of volser_prototypes req
94                                        Format issues
95 uss/uss_kauth.c      : all           : Des keys, ubik_Call
96 uss/lex.yy.c         : all           : Unused symbols
97 viced/fsprobe.c      : all           : ubik_Call
98 vlserver/vlserver.c  : all           : GetExtendedCellInfo
99 vol/salvager.c       : all           : consts & undefined variable from header
100 volser/vos.c         : all           : ubik_Call_New, signedness and const
101 volser/vol-dump.c    : format        : afs_sfsize_t
102 volser/vsprocs.c     : format-extra  : The ONERROR macro needs to be rethought
103