mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
Some fixes
This commit is contained in:
parent
655c2482c9
commit
463426ad47
4 changed files with 16 additions and 8 deletions
|
@ -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\
|
||||
|
|
3
Makefile
3
Makefile
|
@ -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
4
exec.c
|
@ -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;
|
||||
|
||||
|
|
15
include.mk
15
include.mk
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue