From ce941066db29fa369384725bb6d388b98d035eac Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Thu, 7 Jun 2012 11:04:38 -0400 Subject: [PATCH] removed more warnings --- Makefile | 1 - asm.c | 19 ------------------- error.c | 18 ++++++++++-------- 3 files changed, 10 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index 6014e31..4090ab4 100644 --- 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 1619438..afb155c 100644 --- 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 592416a..b9cf740 100644 --- a/error.c +++ b/error.c @@ -29,14 +29,16 @@ * 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, -- 2.39.2