X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=warning.c;h=c102f9c93792a308f60e420d051529c0ae987ddd;hb=387f3d71d78020617fd4c0edbf080f49b5319d18;hp=58d67301b6ec320cf23ad1331f46e9251b3df4cf;hpb=faf611d42369aee8fd20b3163870acf7d94e72fc;p=cparser diff --git a/warning.c b/warning.c index 58d6730..c102f9c 100644 --- a/warning.c +++ b/warning.c @@ -13,8 +13,11 @@ warning_t warning = { .main = true, .missing_declarations = false, .missing_prototypes = false, + .multichar = true, .redundant_decls = true, .s_are_errors = false, + .shadow = false, + .sign_compare = false, .strict_prototypes = true, .switch_default = false, .unknown_pragmas = true, @@ -42,6 +45,7 @@ void set_warning_opt(const char *const opt) #define SET(y) warning.y = state; #define OPT(x, y) OPTX(x) SET(y) OPTX("all") { + /* Note: this switched on a lot of more warnings than gcc's -Wall */ SET(char_subscripts) SET(check_format) SET(empty_statement) @@ -49,8 +53,9 @@ void set_warning_opt(const char *const opt) SET(implicit_int) SET(main) SET(redundant_decls) + SET(shadow) + SET(sign_compare) SET(strict_prototypes) - SET(switch_default) SET(unknown_pragmas) SET(unused_function) SET(unused_label) @@ -83,7 +88,10 @@ void set_warning_opt(const char *const opt) OPT("main", main) OPT("missing-declarations", missing_declarations) OPT("missing-prototypes", missing_prototypes) + OPT("multichar", multichar) OPT("redundant-decls", redundant_decls) + OPT("shadow", shadow) + OPT("sign-compare", sign_compare) OPT("strict-prototypes", strict_prototypes) OPT("switch-default", switch_default) OPT("unknown-pragmas", unknown_pragmas)