X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=warning.c;h=c93ed209f8f55d8f8e421fe54278292dfaab97bf;hb=3345104e6b51bf496dd5dae7e9544f421adb11e7;hp=ebf5f6a52f9e8d628384a64a2e89b95f182fc126;hpb=67569659de101e005c876dbf18ae1a54a97c917e;p=cparser diff --git a/warning.c b/warning.c index ebf5f6a..c93ed20 100644 --- a/warning.c +++ b/warning.c @@ -24,7 +24,8 @@ warning_t warning = { .attribute = true, .char_subscripts = true, - .check_format = true, + .format = true, + .nonnull = true, .empty_statement = false, .fatal_errors = false, .float_equal = false, @@ -68,7 +69,8 @@ void set_warning_opt(const char *const opt) /* 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) @@ -100,7 +102,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)