-BugFix: must use const_wchar_T
[cparser] / warning.c
index a25cb0b..6718586 100644 (file)
--- a/warning.c
+++ b/warning.c
@@ -35,24 +35,28 @@ warning_t warning = {
        .long_long                     = false,
        .main                          = true,
        .missing_declarations          = false,
+       .missing_noreturn              = false,
        .missing_prototypes            = false,
        .multichar                     = true,
        .nested_externs                = false,
        .nonnull                       = true,
        .redundant_decls               = true,
+       .pointer_arith                 = true,
        .return_type                   = true,
        .s_are_errors                  = false,
        .shadow                        = false,
        .sign_compare                  = false,
        .strict_prototypes             = true,
        .switch_default                = false,
+       .switch_enum                   = false,
        .unknown_pragmas               = true,
        .unreachable_code              = false,
        .unused_function               = false,
        .unused_label                  = false,
        .unused_parameter              = false,
        .unused_value                  = true,
-       .unused_variable               = false
+       .unused_variable               = false,
+       .write_strings                 = false
 };
 
 void set_warning_opt(const char *const opt)
@@ -82,6 +86,7 @@ void set_warning_opt(const char *const opt)
                SET(main);
                SET(nonnull);
                SET(redundant_decls);
+               SET(pointer_arith);
                SET(return_type);
                SET(shadow);
                SET(sign_compare);
@@ -93,6 +98,7 @@ void set_warning_opt(const char *const opt)
                SET(unused_parameter);
                SET(unused_value);
                SET(unused_variable);
+               SET(switch_enum);
        }
        OPT("attribute",                     attribute);
        OPT("char-subscripts",               char_subscripts);
@@ -124,16 +130,19 @@ void set_warning_opt(const char *const opt)
        OPT("long-long",                     long_long);
        OPT("main",                          main);
        OPT("missing-declarations",          missing_declarations);
+       OPT("missing-noreturn",              missing_noreturn);
        OPT("missing-prototypes",            missing_prototypes);
        OPT("multichar",                     multichar);
        OPT("nested-externs",                nested_externs);
        OPT("nonnull",                       nonnull);
        OPT("redundant-decls",               redundant_decls);
+       OPT("pointer_arith",                 pointer_arith);
        OPT("return-type",                   return_type);
        OPT("shadow",                        shadow);
        OPT("sign-compare",                  sign_compare);
        OPT("strict-prototypes",             strict_prototypes);
        OPT("switch-default",                switch_default);
+       OPT("switch-enum",                   switch_enum);
        OPT("unknown-pragmas",               unknown_pragmas);
        OPT("unreachable-code",              unreachable_code);
        OPTX("unused") {
@@ -148,6 +157,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("write-strings",                 write_strings);
 #undef OPT
 #undef SET
 #undef OPT_X