aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib.h
diff options
authorJohn Levon <levon@movementarian.org>2018-11-29 10:42:51 +0000
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-01 02:16:24 +0100
commit648380c13ecaaa95c9dfbd500039cd9007ec3c20 (patch)
tree3e6d634f8549a13d97bdbe0fba39aed97364eb9c /lib.h
parenta0f34e0fd2a44016ef668e19187a342c5f4edf45 (diff)
downloadsparse-dev-648380c13ecaaa95c9dfbd500039cd9007ec3c20.tar.gz
Conditionalize 'warning: non-ANSI function ...'
Sparse unconditionally issues warnings about non-ANSI function declarations & definitions. However, some environments have large amounts of legacy headers that are pre-ANSI, and can't easily be changed. These generate a lot of useless warnings. Fix this by using the options flags -Wstrict-prototypes & -Wold-style-definition to conditionalize these warnings. Signed-off-by: John Levon <levon@movementarian.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index bd578be5..ef80826c 100644
--- a/lib.h
+++ b/lib.h
@@ -158,6 +158,7 @@ extern int Wint_to_pointer_cast;
extern int Wmemcpy_max_count;
extern int Wnon_pointer_null;
extern int Wold_initializer;
+extern int Wold_style_definition;
extern int Wone_bit_signed_bitfield;
extern int Woverride_init;
extern int Woverride_init_all;
@@ -171,6 +172,7 @@ extern int Wshadow;
extern int Wshift_count_negative;
extern int Wshift_count_overflow;
extern int Wsizeof_bool;
+extern int Wstrict_prototypes;
extern int Wtautological_compare;
extern int Wtransparent_union;
extern int Wtypesign;