]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
removed more warnings
authorDale Weiler <killfieldengine@gmail.com>
Thu, 7 Jun 2012 15:04:38 +0000 (11:04 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 7 Jun 2012 15:04:38 +0000 (11:04 -0400)
Makefile
asm.c
error.c

index 6014e311f0771971d4c6af3c44710d23ad23c1cc..4090ab4315f49b7861bcdaa1fd658943ed1a20f6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,6 @@ ifeq ($(CC), clang)
                -Wno-conditional-uninitialized \
                -Wno-missing-noreturn \
                -Wno-ignored-qualifiers \
-               -Wno-unused-macros \
                -Wno-format-nonliteral
 
 endif
diff --git a/asm.c b/asm.c
index 161943816e23f0543552b0a7bf4ed9e9b4ec0ed9..afb155c58a08f5e0f811440e78007687a5e9390b 100644 (file)
--- a/asm.c
+++ b/asm.c
@@ -530,24 +530,6 @@ static GMQCC_INLINE bool asm_parse_stmt(const char *skip, size_t line, asm_state
                  * This needs to have a fall state, we start from the
                  * end of the string and work backwards.
                  */
-                #define OPFILL(X)                                      \
-                    do {                                               \
-                        size_t w = 0;                                  \
-                        if (!(c = strrchr(c, ','))) {                  \
-                            printf("error, expected more operands\n"); \
-                            return false;                              \
-                        }                                              \
-                        c++;                                           \
-                        w++;                                           \
-                        while (*c == ' ' || *c == '\t') {              \
-                            c++;                                       \
-                            w++;                                       \
-                        }                                              \
-                        X  = (const char*)c;                           \
-                        c -= w;                                        \
-                       *c  = '\0';                                     \
-                        c  = (char*)skip;                              \
-                    } while (0)
                 #define OPEATS(X,Y) X##Y
                 #define OPCCAT(X,Y) OPEATS(X,Y)
                 #define OPLOAD(X,Y)                                                                \
@@ -597,7 +579,6 @@ static GMQCC_INLINE bool asm_parse_stmt(const char *skip, size_t line, asm_state
                     OPLOAD(s.o1.s1, c);
                     break;
                 }
-                #undef OPFILL
                 #undef OPLOAD
                 #undef OPCCAT
             }
diff --git a/error.c b/error.c
index 592416a8154d1f3ffd5478faf77623c2647da038..b9cf740b6b5ddae8383ff718b87a76598dc6a25e 100644 (file)
--- a/error.c
+++ b/error.c
  * intereting like colors for the console.
  */
 #ifndef WIN32
-#    define CON_BLACK   30
-#    define CON_RED     31
-#    define CON_GREEN   32
-#    define CON_BROWN   33
-#    define CON_BLUE    34
-#    define CON_MAGENTA 35
-#    define CON_CYAN    36
-#    define CON_WHITE   37
+enum {
+    CON_BLACK   = 30,
+    CON_RED,
+    CON_GREEN,
+    CON_BROWN,
+    CON_BLUE,
+    CON_MAGENTA,
+    CON_CYAN ,
+    CON_WHITE
+};
 static const int error_color[] = {
     CON_RED,
     CON_CYAN,