aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib.c
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-11-30 22:51:24 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-01 02:14:10 +0100
commiteb35b2e8aa79552fe0ccd7a4e7a7753b230cbdd4 (patch)
treee8377e3916984fc17e9452dfab6c9537c03e603d /lib.c
parent6f7aa5e84dacec8e27a8d70090bba26a1a1276de (diff)
downloadsparse-dev-eb35b2e8aa79552fe0ccd7a4e7a7753b230cbdd4.tar.gz
Use -Wimplicit-int when warning about missing K&R argument types
In legacy environment, a lot of warnings can be issued about arguments without an explicit type. Fix this by contitionalizing such warnings with the flag -Wimplicit-int, reducing the level of noise in such environment. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 81820745..314b65e9 100644
--- a/lib.c
+++ b/lib.c
@@ -262,6 +262,7 @@ int Wdeclarationafterstatement = -1;
int Wdefault_bitfield_sign = 0;
int Wdesignated_init = 1;
int Wdo_while = 0;
+int Wimplicit_int = 1;
int Winit_cstring = 0;
int Wint_to_pointer_cast = 1;
int Wenum_mismatch = 1;
@@ -700,6 +701,7 @@ static const struct flag warnings[] = {
{ "designated-init", &Wdesignated_init },
{ "do-while", &Wdo_while },
{ "enum-mismatch", &Wenum_mismatch },
+ { "implicit-int", &Wimplicit_int },
{ "init-cstring", &Winit_cstring },
{ "int-to-pointer-cast", &Wint_to_pointer_cast },
{ "memcpy-max-count", &Wmemcpy_max_count },