aboutsummaryrefslogtreecommitdiff
path: root/lib.c
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2007-06-13 13:29:36 -0700
committerJosh Triplett <josh@freedesktop.org>2007-06-13 13:29:36 -0700
commitaad20c6c1fbf0ca97928ed673b35c0143823fd1b (patch)
tree5ec353ed6d0702d57fedb25be52f6fd6d912ccd0 /lib.c
parentImprove error message if using a member of an incomplete struct or union (diff)
downloadsparse-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index ca5a0d9..190d8d7 100644
--- a/lib.c
+++ b/lib.c
@@ -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;