]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Added handler for -W
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index 2361fd76a0c0c46d9496630021e710f4b4417493..4eebd20b14b40d094966dfd38f5d7c03477fea83 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -994,10 +994,21 @@ enum {
 };
 static const opt_flag_def opt_flag_list[] = {
     { "darkplaces-string-table-bug", LONGBIT(DP_STRING_TABLE_BUG) },
-    { "omit-nullbytes",              LONGBIT(OMIT_NULLBYTES)      },
+    { "omit-nullbytes",              LONGBIT(OMIT_NULLBYTES)      }
 };
 static const size_t opt_flag_list_count = sizeof(opt_flag_list) / sizeof(opt_flag_list[0]);
 
+enum {
+    WARN_UNUSED_VARIABLE,
+
+    NUM_W_FLAGS
+};
+static const opt_flag_def opt_warn_list[] = {
+    /* only contains single flags, no groups like 'all' */
+    { "unused-variable",             LONGBIT(WARN_UNUSED_VARIABLE) }
+};
+static const size_t opt_warn_list_count = sizeof(opt_warn_list) / sizeof(opt_warn_list[0]);
+
 /* other options: */
 extern uint32_t    opt_O;      /* -Ox */
 extern const char *opt_output; /* -o file */
@@ -1012,5 +1023,7 @@ enum {
 /*===================================================================*/
 #define OPT_FLAG(i) (!! (opt_flags[(i)/32] & (1<< ((i)%32))))
 extern uint32_t opt_flags[1 + (NUM_F_FLAGS / 32)];
+#define OPT_WARN(i) (!! (opt_warn[(i)/32] & (1<< ((i)%32))))
+extern uint32_t opt_warn[1 + (NUM_W_FLAGS / 32)];
 
 #endif