Windows AFSRDR: Log before decrementing refcount
[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          : all           : call_syscall nonsense
46 afsd/afsd_kernel.c   : deprecated    : daemon() marked as deprecated on Darwin
47                      : strict-proto  : call_syscall missing prototype
48 auth/ktc.c           : all (ukernel) : call_syscall doesn't have a prototype
49 bozo/bosserver.c     : deprecated    : daemon() marked as deprecated on Darwin
50 bucoord/ubik_db_if.c : strict-proto  : Ubik_Call
51 bucoord/commands.c   : all           : Ubik_Call
52                                      : signed vs unsigned for dates
53 butc/tcudbprocs.c    : all           : ubik_Call
54 kauth/admin_tools.c  : all           : signed vs unsigned for dates
55 kauth/authclient.c   : strict-proto  : ubik_Call nonsense
56 libadmin/kas/afs_kasAdmin.c: all     : Ubik_Call nonsense
57 libadmin/samples/rxstat_query_peer.c : all : util_RPCStatsStateGet types
58 libadmin/samples/rxstat_query_process.c : all : util_RPCStatsStateGet types
59 libadmin/test/client.c : all         : util_RPCStatsStateGet types
60 rxkad/ticket5.c      : all           : v5gen.c has set-but-unused variables
61 ubik/ubikclient.c    : strict-protos : ubik_Call
62 volser/vol-dump.c    : format        : afs_sfsize_t
63