]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - opts.c
Reorder the warnings in opts.c to match their oder in opts.def, added WARN_LOCAL_SHAD...
[xonotic/gmqcc.git] / opts.c
diff --git a/opts.c b/opts.c
index f1aa937a8cb573d158a69fd45f258955e21b1d5b..2a7dc8d3dde16507aa9b1948d28dddc6489732e6 100644 (file)
--- a/opts.c
+++ b/opts.c
@@ -29,18 +29,19 @@ static void opts_setdefault() {
     memset(&opts, 0, sizeof(opts_cmd_t));
     
     /* warnings */
+    opts_set(opts.warn,  WARN_UNUSED_VARIABLE,           true);
+    opts_set(opts.warn,  WARN_USED_UNINITIALIZED,        true);
     opts_set(opts.warn,  WARN_UNKNOWN_CONTROL_SEQUENCE,  true);
     opts_set(opts.warn,  WARN_EXTENSIONS,                true);
     opts_set(opts.warn,  WARN_FIELD_REDECLARED,          true);
-    opts_set(opts.warn,  WARN_TOO_FEW_PARAMETERS,        true);
     opts_set(opts.warn,  WARN_MISSING_RETURN_VALUES,     true);
-    opts_set(opts.warn,  WARN_USED_UNINITIALIZED,        true);
+    opts_set(opts.warn,  WARN_TOO_FEW_PARAMETERS,        true);
+    opts_set(opts.warn,  WARN_LOCAL_SHADOWS,             false);
     opts_set(opts.warn,  WARN_LOCAL_CONSTANTS,           true);
     opts_set(opts.warn,  WARN_VOID_VARIABLES,            true);
     opts_set(opts.warn,  WARN_IMPLICIT_FUNCTION_POINTER, true);
     opts_set(opts.warn,  WARN_VARIADIC_FUNCTION,         true);
     opts_set(opts.warn,  WARN_FRAME_MACROS,              true);
-    opts_set(opts.warn,  WARN_UNUSED_VARIABLE,           true);
     opts_set(opts.warn,  WARN_EFFECTLESS_STATEMENT,      true);
     opts_set(opts.warn,  WARN_END_SYS_FIELDS,            true);
     opts_set(opts.warn,  WARN_ASSIGN_FUNCTION_TYPES,     true);
@@ -50,11 +51,11 @@ static void opts_setdefault() {
     opts_set(opts.warn,  WARN_CONST_VAR,                 true);
     opts_set(opts.warn,  WARN_MULTIBYTE_CHARACTER,       true);
     opts_set(opts.warn,  WARN_UNKNOWN_PRAGMAS,           true);
+    opts_set(opts.warn,  WARN_UNREACHABLE_CODE,          true);
     /* flags */
     opts_set(opts.flags, ADJUST_VECTOR_FIELDS,           true);
     opts_set(opts.flags, FTEPP,                          false);
     opts_set(opts.flags, CORRECT_TERNARY,                true);
-    opts_set(opts.flags, ALLOW_UNREACHABLE_CODE,         true);
 }
 
 void opts_init(const char *output, int standard, size_t arraysize) {