X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=warning.c;h=42b47b4675a84eeca6d87c25edad69d9a76c710d;hb=28fe814110e20a3c43a79af2ee2444f9d8ea4f1e;hp=05195e6227f04db7efa1d07e54daee80bc1fb057;hpb=fd16b92f058181088a385c3224c8814831c006d3;p=cparser diff --git a/warning.c b/warning.c index 05195e6..42b47b4 100644 --- a/warning.c +++ b/warning.c @@ -22,8 +22,10 @@ #include "warning.h" warning_t warning = { + .attribute = true, .char_subscripts = true, - .check_format = true, + .format = true, + .nonnull = true, .empty_statement = false, .fatal_errors = false, .float_equal = false, @@ -44,7 +46,8 @@ warning_t warning = { .unused_label = false, .unused_parameter = false, .unused_value = true, - .unused_variable = false + .unused_variable = false, + .return_type = true }; void set_warning_opt(const char *const opt) @@ -65,8 +68,10 @@ void set_warning_opt(const char *const opt) #define OPT(x, y) OPTX(x) SET(y) OPTX("all") { /* Note: this switched on a lot of more warnings than gcc's -Wall */ + SET(attribute) SET(char_subscripts) - SET(check_format) + SET(format) + SET(nonnull) SET(empty_statement) SET(implicit_function_declaration) SET(implicit_int) @@ -81,7 +86,9 @@ void set_warning_opt(const char *const opt) SET(unused_parameter) SET(unused_value) SET(unused_variable) + SET(return_type) } + OPT("attribute", attribute) OPT("char-subscripts", char_subscripts) OPT("empty-statement", empty_statement) OPT("error", s_are_errors) @@ -97,7 +104,11 @@ void set_warning_opt(const char *const opt) } OPT("fatal-errors", fatal_errors) OPT("float-equal", float_equal) - OPT("format", check_format) + OPTX("format") { + SET(format) + SET(nonnull) + } + OPT("nonnull", nonnull) OPTX("implicit") { SET(implicit_function_declaration) SET(implicit_int) @@ -126,6 +137,7 @@ void set_warning_opt(const char *const opt) OPT("unused-parameter", unused_parameter) OPT("unused-value", unused_value) OPT("unused-variable", unused_variable) + OPT("return-type", return_type) #undef OPT #undef SET #undef OPT_X