]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
replacing WARN_ERROR with opts_werror
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 12:36:33 +0000 (14:36 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 12:36:33 +0000 (14:36 +0200)
gmqcc.h
main.c
warns.def

diff --git a/gmqcc.h b/gmqcc.h
index e0784942444239af78dc0bced3696693994adf52..9d34199b7ad562191231010e46879d34337db8ed 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -993,6 +993,7 @@ extern int         opts_standard;
 extern bool        opts_debug;
 extern bool        opts_memchk;
 extern bool        opts_dump;
+extern bool        opts_werror;
 
 /*===================================================================*/
 #define OPTS_FLAG(i) (!! (opts_flags[(i)/32] & (1<< ((i)%32))))
diff --git a/main.c b/main.c
index 272c493d3c54056c1bad2348dc294b2f59129d94..36d757b2762905644e6ac55a81e057399e437a4b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -31,6 +31,7 @@ int         opts_standard = COMPILER_GMQCC;
 bool        opts_debug    = false;
 bool        opts_memchk   = false;
 bool        opts_dump     = false;
+bool        opts_werror   = false;
 
 static bool opts_output_wasset = false;
 
@@ -230,6 +231,14 @@ static bool options_parse(int argc, char **argv) {
                         }
                         exit(0);
                     }
+                    else if (!strcmp(argv[0]+2, "NO_ERROR")) {
+                        opts_werror = false;
+                        break;
+                    }
+                    else if (!strcmp(argv[0]+2, "ERROR")) {
+                        opts_werror = true;
+                        break;
+                    }
                     else if (!strcmp(argv[0]+2, "ALL")) {
                         for (itr = 0; itr < sizeof(opts_warn)/sizeof(opts_warn[0]); ++itr)
                             opts_warn[itr] = 0xFFFFFFFFL;
index 6cfb95154718d842b920572573d3156df1104ec2..3136956650b4498884b9e20cbcfd967eb93ce397 100644 (file)
--- a/warns.def
+++ b/warns.def
@@ -7,4 +7,3 @@ GMQCC_DEFINE_FLAG(UNUSED_VARIABLE)
 GMQCC_DEFINE_FLAG(UNKNOWN_CONTROL_SEQUENCE)
 GMQCC_DEFINE_FLAG(EXTENSIONS)
 GMQCC_DEFINE_FLAG(FIELD_REDECLARED)
-GMQCC_DEFINE_FLAG(ERROR)