Some fixes

This commit is contained in:
Dale Weiler 2014-05-25 02:27:02 -04:00
parent 655c2482c9
commit 463426ad47
4 changed files with 16 additions and 8 deletions

View file

@ -11,8 +11,6 @@ GITINFO :=
GITINFO != git describe --always
.endif
CFLAGS += -Wall -Wextra -Werror -Wstrict-aliasing -Wno-attributes
.if $(CC) == clang
CFLAGS += -Weverything\
-Wno-padded\

View file

@ -4,8 +4,7 @@ UNAME ?= $(shell uname)
CYGWIN = $(findstring CYGWIN, $(UNAME))
MINGW = $(findstring MINGW, $(UNAME))
CFLAGS += -Wall -Wextra -Werror -Wstrict-aliasing -Wno-attributes -O3
#turn on tons of warnings if clang is present
# turn on tons of warnings if clang is present
# but also turn off the STUPID ONES
ifeq ($(CC), clang)
CFLAGS += \

4
exec.c
View file

@ -912,7 +912,7 @@ static void prog_main_setparams(qc_program_t *prog) {
}
}
void prog_disasm_function(qc_program_t *prog, size_t id);
static void prog_disasm_function(qc_program_t *prog, size_t id);
int main(int argc, char **argv) {
size_t i;
@ -1227,7 +1227,7 @@ int main(int argc, char **argv) {
return 0;
}
void prog_disasm_function(qc_program_t *prog, size_t id) {
static void prog_disasm_function(qc_program_t *prog, size_t id) {
prog_section_function_t *fdef = prog->functions + id;
prog_section_statement_t *st;

View file

@ -5,6 +5,9 @@ BINDIR := $(PREFIX)/bin
DATADIR := $(PREFIX)/share
MANDIR := $(DATADIR)/man
# default flags
CFLAGS += -Wall -Wextra -Werror -Wstrict-aliasing -Wno-attributes -O2
# compiler
CC ?= clang
@ -101,7 +104,12 @@ SPLINTFLAGS = \
-observertrans \
-abstract \
-statictrans \
-castfcnptr
-castfcnptr \
-shiftimplementation \
-shiftnegative \
-boolcompare \
-infloops \
-sysunrecog
#always the right rule
default: all
@ -118,13 +126,16 @@ uninstall:
#style rule
STYLE_MATCH = \( -name '*.[ch]' -or -name '*.def' -or -name '*.qc' \)
# splint cannot parse the MSVC source
SPLINT_MATCH = \( -name '*.[ch]' -and ! -name 'msvc.c' -and ! -path './doc/*' \)
style:
find . -type f $(STYLE_MATCH) -exec sed -i 's/ *$$//' '{}' ';'
find . -type f $(STYLE_MATCH) -exec sed -i -e '$$a\' '{}' ';'
find . -type f $(STYLE_MATCH) -exec sed -i 's/\t/ /g' '{}' ';'
splint:
@splint $(SPLINTFLAGS) *.c *.h
@splint $(SPLINTFLAGS) `find . -type f $(SPLINT_MATCH)`
gource:
@gource $(GOURCEFLAGS)