]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
close #76 implemented -Werror-some-warning section [errors] for the ini system.
authorDale Weiler <killfieldengine@gmail.com>
Mon, 7 Jan 2013 12:46:50 +0000 (12:46 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Mon, 7 Jan 2013 12:46:50 +0000 (12:46 +0000)
opts.c

diff --git a/opts.c b/opts.c
index 548381a3be634385b989803c63d8e46e0d2ca4fd..2c8fd16cfbc4bb6790821f829e62117a36ded4ff 100644 (file)
--- a/opts.c
+++ b/opts.c
@@ -276,6 +276,15 @@ static char *opts_ini_load(const char *section, const char *name, const char *va
     }
     #include "opts.def"
 
+    /* Werror-individuals */
+    #define GMQCC_TYPE_WARNS
+    #define GMQCC_DEFINE_FLAG(X)                                       \
+    if (!strcmp(section, "errors") && !strcmp(name, #X)) {             \
+        opts_set(opts.werror, WARN_##X, opts_ini_bool(value));         \
+        found = true;                                                  \
+    }
+    #include "opts.def"
+
     /* optimizations */
     #define GMQCC_TYPE_OPTIMIZATIONS
     #define GMQCC_DEFINE_FLAG(X,Y)                                     \