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:
Dale Weiler 2012-06-07 10:57:48 -04:00
parent d59819620b
commit 84c110e8f5
3 changed files with 25 additions and 3 deletions

View file

@ -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
View file

@ -124,7 +124,6 @@ static int lex_trigraph(lex_file *file) {
default:
lex_unget('?', file);
lex_unget(ch , file);
return '?';
}
return '?';
}

1
main.c
View file

@ -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; }