X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=warning.c;h=77649d67ca974c6990a3969ee3d6db4716b31c8c;hb=c2564629583b7a0969aa0102d628f065b1ed66d3;hp=e695a89aedd98b533a8d6459aaff0611242e9846;hpb=dfaf7d3ffb88541a0f8b0516802c735afc122530;p=cparser diff --git a/warning.c b/warning.c index e695a89..77649d6 100644 --- a/warning.c +++ b/warning.c @@ -22,6 +22,9 @@ #include "warning.h" warning_t warning = { + .other = true, + + .address = true, .aggregate_return = false, .attribute = true, .cast_qual = false, @@ -47,6 +50,8 @@ warning_t warning = { .nested_externs = false, .nonnull = true, .old_style_definition = false, + .packed = false, + .padded = false, .pointer_arith = true, .redundant_decls = true, .return_type = true, @@ -84,7 +89,10 @@ void set_warning_opt(const char *const opt) #define SET(y) (void)(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 */ + /* Note: this switched on a lot more warnings than gcc's -Wall */ + SET(other); + + SET(address); SET(attribute); SET(char_subscripts); SET(comment); @@ -110,6 +118,7 @@ void set_warning_opt(const char *const opt) SET(unused_value); SET(unused_variable); } + OPT("address", address); OPT("aggregate-return", aggregate_return); OPT("attribute", attribute); OPT("cast-qual", cast_qual); @@ -118,7 +127,7 @@ void set_warning_opt(const char *const opt) OPT("conversion", conversion); OPT("declaration-after-statement", declaration_after_statement); OPT("deprecated-declarations", deprecated_declarations); - OPT("div_by_zero", div_by_zero); + OPT("div-by-zero", div_by_zero); OPT("empty-statement", empty_statement); OPT("error", s_are_errors); OPTX("extra") { @@ -153,7 +162,9 @@ void set_warning_opt(const char *const opt) OPT("nested-externs", nested_externs); OPT("nonnull", nonnull); OPT("old-style-definition", old_style_definition); - OPT("pointer_arith", pointer_arith); + OPT("packed", packed); + OPT("padded", padded); + OPT("pointer-arith", pointer_arith); OPT("redundant-decls", redundant_decls); OPT("return-type", return_type); OPT("shadow", shadow);