mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
More compile warnings (disabled many for now, they will be re-enabled one-by-one as code that triggers warnings is rectified)
This commit is contained in:
parent
d59819620b
commit
84c110e8f5
3 changed files with 25 additions and 3 deletions
26
Makefile
26
Makefile
|
@ -1,5 +1,27 @@
|
|||
CC ?= clang
|
||||
CFLAGS += -Wall -I. -pedantic-errors -std=c90 -Wno-attributes
|
||||
CFLAGS += -Wall -I. -pedantic-errors -std=c90
|
||||
|
||||
#turn on tons of warnings if clang is present
|
||||
ifeq ($(CC), clang)
|
||||
CFLAGS += \
|
||||
-Weverything \
|
||||
-Wno-missing-prototypes \
|
||||
-Wno-unused-parameter \
|
||||
-Wno-sign-compare \
|
||||
-Wno-implicit-fallthrough \
|
||||
-Wno-sign-conversion \
|
||||
-Wno-conversion \
|
||||
-Wno-disabled-macro-expansion \
|
||||
-Wno-padded \
|
||||
-Wno-undef \
|
||||
-Wno-conditional-uninitialized \
|
||||
-Wno-missing-noreturn \
|
||||
-Wno-ignored-qualifiers \
|
||||
-Wno-unused-macros \
|
||||
-Wno-format-nonliteral \
|
||||
-Wno-shadow
|
||||
|
||||
endif
|
||||
OBJ = lex.o \
|
||||
error.o \
|
||||
parse.o \
|
||||
|
@ -34,3 +56,5 @@ all: test gmqcc
|
|||
|
||||
clean:
|
||||
rm -f *.o gmqcc test_ast test_ir test/*.o
|
||||
|
||||
|
||||
|
|
1
lex.c
1
lex.c
|
@ -124,7 +124,6 @@ static int lex_trigraph(lex_file *file) {
|
|||
default:
|
||||
lex_unget('?', file);
|
||||
lex_unget(ch , file);
|
||||
return '?';
|
||||
}
|
||||
return '?';
|
||||
}
|
||||
|
|
1
main.c
1
main.c
|
@ -105,7 +105,6 @@ int main(int argc, char **argv) {
|
|||
if (util_strncmpexact(&argv[1][1], "memchk", 6)) { opts_memchk = true; break; }
|
||||
if (util_strncmpexact(&argv[1][1], "help", 4)) {
|
||||
return usage(app);
|
||||
break;
|
||||
}
|
||||
/* compiler type selection */
|
||||
if (util_strncmpexact(&argv[1][1], "std=qcc" , 7 )) { opts_compiler = COMPILER_QCC; break; }
|
||||
|
|
Loading…
Reference in a new issue