diff options
author | Josh Triplett <josh@freedesktop.org> | 2007-06-13 13:29:36 -0700 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2007-06-13 13:29:36 -0700 |
commit | aad20c6c1fbf0ca97928ed673b35c0143823fd1b (patch) | |
tree | 5ec353ed6d0702d57fedb25be52f6fd6d912ccd0 /lib.c | |
parent | Improve error message if using a member of an incomplete struct or union (diff) | |
download | sparse-aad20c6c1fbf0ca97928ed673b35c0143823fd1b.tar.gz sparse-aad20c6c1fbf0ca97928ed673b35c0143823fd1b.tar.bz2 sparse-aad20c6c1fbf0ca97928ed673b35c0143823fd1b.zip |
Turn on -Wdecl by default.
-Wdecl warns about global, non-static symbols with no forward declarations.
Normally, intentionally global functions called by other parts of a program
will have forward declarations, so global symbols without such declarations
often have no use outside the current file and should use static.
Note that to avoid false positives, any source file that declares functions
for export should always include the header file that forward-declares its own
functions. This also helps for other reasons, such as obtaining any Sparse
annotations declared on the function to use when analyzing calls to it from
within the same source file.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -197,7 +197,7 @@ int Wcontext = 1; int Wundefined_preprocessor = 0; int Wptr_subtraction_blows = 0; int Wcast_to_address_space = 0; -int Wdecl = 0; +int Wdecl = 1; int Wtransparent_union = 1; int Wshadow = 0; int Waddress_space = 1; |