mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
extra warnings
This commit is contained in:
parent
1b0fd2389a
commit
5c09e33de6
1 changed files with 36 additions and 15 deletions
|
@ -45,23 +45,44 @@ else
|
||||||
RANLIB= ranlib
|
RANLIB= ranlib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DEFCFLAGS = -Wall -Werror -O3
|
DEFCFLAGS = -Wall -Werror -O3 -fstrict-aliasing -pipe
|
||||||
# Some more warnings we want as errors:
|
# Some more warnings we want as errors:
|
||||||
DEFCFLAGS += -Wcast-align -Wbad-function-cast -Wredundant-decls -Wmissing-prototypes -Wchar-subscripts -Wshadow -Wundef -Wwrite-strings -Wunused -Wuninitialized -Wpointer-arith -Winline -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Wnested-externs -Wmissing-declarations -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers
|
DEFCFLAGS += -Wbad-function-cast -Wredundant-decls -Wmissing-prototypes -Wchar-subscripts -Wshadow -Wundef -Wwrite-strings -Wunused -Wuninitialized -Wpointer-arith -Winline -Wformat -Wformat-security -Winit-self -Wmissing-include-dirs -Wnested-externs -Wmissing-declarations -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers -Wtype-limits
|
||||||
# Some more warnings we need first to eliminate, so temporarely tolerated:
|
# Some more warnings we need first to eliminate, so temporarely tolerated:
|
||||||
DEFCFLAGS += -Wno-error=cast-align
|
DEFCFLAGS += -Wcast-align -Wno-error=cast-align
|
||||||
# TODO?:
|
|
||||||
#DEFCFLAGS += -Wunused-parameter -Wno-error=unused-parameter
|
# Next ones are activated only if GCCEXTRA=1 or CLANGEXTRA=1
|
||||||
#DEFCFLAGS += -Wold-style-declaration -Wno-error=old-style-declaration
|
EXTRACFLAGS =
|
||||||
#DEFCFLAGS += -Wsign-compare -Wno-error=sign-compare
|
EXTRACFLAGS += -Wunused-parameter -Wno-error=unused-parameter
|
||||||
#DEFCFLAGS += -Wimplicit-fallthrough=3 -Wno-error=implicit-fallthrough
|
EXTRACFLAGS += -Wsign-compare -Wno-error=sign-compare
|
||||||
#DEFCFLAGS += -Wtype-limits -Wno-error=type-limits
|
EXTRACFLAGS += -Wswitch-enum -Wno-error=switch-enum
|
||||||
#DEFCFLAGS += -Wunused-but-set-parameter -Wno-error=unused-but-set-parameter
|
EXTRACFLAGS += -Wold-style-definition -Wno-error=old-style-definition
|
||||||
#DEFCFLAGS += -Wswitch-enum -Wno-error=switch-enum
|
|
||||||
#DEFCFLAGS += -Wold-style-definition -Wno-error=old-style-definition
|
# unknown to clang or old gcc:
|
||||||
# unknown to clang: -Wclobbered -Wmissing-parameter-type -Wcast-function-type
|
# First we activate Wextra then we explicitly list those we know about
|
||||||
# unknown to clang < 8: -Woverride-init
|
GCCEXTRACFLAGS = -Wextra
|
||||||
# unknown to gcc < 6: -Wshift-negative-value
|
GCCEXTRACFLAGS += -Wclobbered -Wno-error=clobbered
|
||||||
|
GCCEXTRACFLAGS += -Wcast-function-type -Wno-error=cast-function-type
|
||||||
|
GCCEXTRACFLAGS += -Wimplicit-fallthrough=3 -Wno-error=implicit-fallthrough
|
||||||
|
GCCEXTRACFLAGS += -Wmissing-parameter-type -Wno-error=missing-parameter-type
|
||||||
|
GCCEXTRACFLAGS += -Wold-style-declaration -Wno-error=old-style-declaration
|
||||||
|
GCCEXTRACFLAGS += -Woverride-init -Wno-error=override-init
|
||||||
|
GCCEXTRACFLAGS += -Wshift-negative-value -Wno-error=shift-negative-value
|
||||||
|
GCCEXTRACFLAGS += -Wunused-but-set-parameter -Wno-error=unused-but-set-parameter
|
||||||
|
ifeq ($(GCCEXTRA),1)
|
||||||
|
DEFCFLAGS += $(GCCEXTRACFLAGS) $(EXTRACFLAGS)
|
||||||
|
endif
|
||||||
|
# unknown to gcc or old clang:
|
||||||
|
# First we activate Wextra then we explicitly list those we know about
|
||||||
|
CLANGEXTRACFLAGS = -Wextra
|
||||||
|
CLANGEXTRACFLAGS += -Wtautological-type-limit-compare
|
||||||
|
CLANGEXTRACFLAGS += -Wnull-pointer-arithmetic
|
||||||
|
CLANGEXTRACFLAGS += -Woverride-init
|
||||||
|
CLANGEXTRACFLAGS += -Wshift-negative-value
|
||||||
|
CLANGEXTRACFLAGS += -Wimplicit-fallthrough
|
||||||
|
ifeq ($(CLANGEXTRA),1)
|
||||||
|
DEFCFLAGS += $(CLANGEXTRACFLAGS) $(EXTRACFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),Darwin)
|
ifeq ($(platform),Darwin)
|
||||||
# their readline has strict-prototype issues
|
# their readline has strict-prototype issues
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue