mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 22:31:36 +00:00
removed more warnings
This commit is contained in:
parent
911c2bddb6
commit
ce941066db
3 changed files with 10 additions and 28 deletions
1
Makefile
1
Makefile
|
@ -17,7 +17,6 @@ ifeq ($(CC), clang)
|
||||||
-Wno-conditional-uninitialized \
|
-Wno-conditional-uninitialized \
|
||||||
-Wno-missing-noreturn \
|
-Wno-missing-noreturn \
|
||||||
-Wno-ignored-qualifiers \
|
-Wno-ignored-qualifiers \
|
||||||
-Wno-unused-macros \
|
|
||||||
-Wno-format-nonliteral
|
-Wno-format-nonliteral
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
19
asm.c
19
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
|
* This needs to have a fall state, we start from the
|
||||||
* end of the string and work backwards.
|
* 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 OPEATS(X,Y) X##Y
|
||||||
#define OPCCAT(X,Y) OPEATS(X,Y)
|
#define OPCCAT(X,Y) OPEATS(X,Y)
|
||||||
#define OPLOAD(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);
|
OPLOAD(s.o1.s1, c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#undef OPFILL
|
|
||||||
#undef OPLOAD
|
#undef OPLOAD
|
||||||
#undef OPCCAT
|
#undef OPCCAT
|
||||||
}
|
}
|
||||||
|
|
18
error.c
18
error.c
|
@ -29,14 +29,16 @@
|
||||||
* intereting like colors for the console.
|
* intereting like colors for the console.
|
||||||
*/
|
*/
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
# define CON_BLACK 30
|
enum {
|
||||||
# define CON_RED 31
|
CON_BLACK = 30,
|
||||||
# define CON_GREEN 32
|
CON_RED,
|
||||||
# define CON_BROWN 33
|
CON_GREEN,
|
||||||
# define CON_BLUE 34
|
CON_BROWN,
|
||||||
# define CON_MAGENTA 35
|
CON_BLUE,
|
||||||
# define CON_CYAN 36
|
CON_MAGENTA,
|
||||||
# define CON_WHITE 37
|
CON_CYAN ,
|
||||||
|
CON_WHITE
|
||||||
|
};
|
||||||
static const int error_color[] = {
|
static const int error_color[] = {
|
||||||
CON_RED,
|
CON_RED,
|
||||||
CON_CYAN,
|
CON_CYAN,
|
||||||
|
|
Loading…
Reference in a new issue