-warning_t warning = {
- .other = true,
-
- .address = true,
- .aggregate_return = false,
- .attribute = true,
- .cast_qual = false,
- .char_subscripts = true,
- .comment = false,
- .conversion = false,
- .declaration_after_statement = false,
- .deprecated_declarations = true,
- .div_by_zero = true,
- .empty_statement = false,
- .error_implicit_function_declaration = false,
- .fatal_errors = false,
- .float_equal = false,
- .format = true,
- .implicit_function_declaration = true,
- .implicit_int = true,
- .init_self = true,
- .long_long = false,
- .main = true,
- .missing_declarations = false,
- .missing_noreturn = false,
- .missing_prototypes = false,
- .multichar = true,
- .nested_externs = false,
- .nonnull = true,
- .old_style_definition = false,
- .packed = false,
- .padded = false,
- .parentheses = false,
- .pointer_arith = true,
- .redundant_decls = true,
- .return_type = true,
- .s_are_errors = false,
- .shadow = false,
- .shadow_local = false,
- .sign_compare = false,
- .strict_prototypes = true,
- .switch_default = false,
- .switch_enum = false,
- .traditional = false,
- .uninitialized = true,
- .unknown_pragmas = true,
- .unreachable_code = false,
- .unused_function = false,
- .unused_label = false,
- .unused_parameter = false,
- .unused_value = true,
- .unused_variable = false,
- .write_strings = false
+static warning_switch_t warning[] = {
+ [WARN_ADDRESS] = { WARN_STATE_ON, "address" },
+ [WARN_AGGREGATE_RETURN] = { WARN_STATE_NONE, "aggregate-return" },
+ [WARN_ATTRIBUTE] = { WARN_STATE_ON, "attribute" },
+ [WARN_CAST_QUAL] = { WARN_STATE_NONE, "cast-qual", },
+ [WARN_CHAR_SUBSCRIPTS] = { WARN_STATE_ON, "char-subscripts", },
+ [WARN_COMMENT] = { WARN_STATE_NONE, "comment", },
+ [WARN_CONVERSION] = { WARN_STATE_NONE, "conversion", },
+ [WARN_DECLARATION_AFTER_STATEMENT] = { WARN_STATE_NONE, "declaration-after-statement", },
+ [WARN_DEPRECATED_DECLARATIONS] = { WARN_STATE_ON, "deprecated-declarations", },
+ [WARN_DIV_BY_ZERO] = { WARN_STATE_ON, "div-by-zero", },
+ [WARN_EMPTY_STATEMENT] = { WARN_STATE_NONE, "empty-statement", },
+ [WARN_ERROR] = { WARN_STATE_NONE, "error" },
+ [WARN_FATAL_ERRORS] = { WARN_STATE_NONE, "fatal-errors" },
+ [WARN_FLOAT_EQUAL] = { WARN_STATE_NONE, "float-equal", },
+ [WARN_FORMAT] = { WARN_STATE_ON, "format" },
+ [WARN_IMPLICIT_FUNCTION_DECLARATION] = { WARN_STATE_ON, "implicit-function-declaration" },
+ [WARN_IMPLICIT_INT] = { WARN_STATE_ON, "implicit-int" },
+ [WARN_INIT_SELF] = { WARN_STATE_ON, "init-self", },
+ [WARN_LONG_LONG] = { WARN_STATE_NONE, "long-long" },
+ [WARN_MAIN] = { WARN_STATE_ON, "main", },
+ [WARN_MISSING_DECLARATIONS] = { WARN_STATE_NONE, "missing-declarations", },
+ [WARN_MISSING_NORETURN] = { WARN_STATE_NONE, "missing-noreturn", },
+ [WARN_MISSING_PROTOTYPES] = { WARN_STATE_NONE, "missing-prototypes", },
+ [WARN_MULTICHAR] = { WARN_STATE_ON, "multichar", },
+ [WARN_NESTED_EXTERNS] = { WARN_STATE_NONE, "nested-externs" },
+ [WARN_NONNULL] = { WARN_STATE_ON, "nonnull", },
+ [WARN_OLD_STYLE_DEFINITION] = { WARN_STATE_NONE, "old-style-definition", },
+ [WARN_OTHER] = { WARN_STATE_ON, "other" },
+ [WARN_PACKED] = { WARN_STATE_NONE, "packed", },
+ [WARN_PADDED] = { WARN_STATE_NONE, "padded", },
+ [WARN_PARENTHESES] = { WARN_STATE_NONE, "parentheses", },
+ [WARN_POINTER_ARITH] = { WARN_STATE_ON, "pointer-arith", },
+ [WARN_REDUNDANT_DECLS] = { WARN_STATE_ON, "redundant-decls", },
+ [WARN_RETURN_TYPE] = { WARN_STATE_ON, "return-type", },
+ [WARN_SHADOW] = { WARN_STATE_NONE, "shadow", },
+ [WARN_SHADOW_LOCAL] = { WARN_STATE_NONE, "shadow-local", },
+ [WARN_SIGN_COMPARE] = { WARN_STATE_NONE, "sign-compare", },
+ [WARN_STRICT_PROTOTYPES] = { WARN_STATE_ON, "strict-prototypes" },
+ [WARN_SWITCH_DEFAULT] = { WARN_STATE_NONE, "switch-default", },
+ [WARN_SWITCH_ENUM] = { WARN_STATE_NONE, "switch-enum", },
+ [WARN_TRADITIONAL] = { WARN_STATE_NONE, "traditional" },
+ [WARN_UNINITIALIZED] = { WARN_STATE_ON, "uninitialized", },
+ [WARN_UNKNOWN_PRAGMAS] = { WARN_STATE_ON, "unknown-pragmas", },
+ [WARN_UNREACHABLE_CODE] = { WARN_STATE_NONE, "unreachable-code" },
+ [WARN_UNUSED_FUNCTION] = { WARN_STATE_NONE, "unused-function", },
+ [WARN_UNUSED_LABEL] = { WARN_STATE_NONE, "unused-label", },
+ [WARN_UNUSED_PARAMETER] = { WARN_STATE_NONE, "unused-parameter", },
+ [WARN_UNUSED_VALUE] = { WARN_STATE_ON, "unused-value", },
+ [WARN_UNUSED_VARIABLE] = { WARN_STATE_NONE, "unused-variable", },
+ [WARN_WRITE_STRINGS] = { WARN_STATE_NONE, "write-strings", },