Bugfix/fix redundant compiler flags (#658)
* Improved GCC compiler flags in ARM, OS, and test builds. Removed redundant flags, and made them consistent across various builds. * Fixed redundant redeclaration of various functions detected by change in compiler flags. * Fixed string truncation warning in bip-init detected by change in compiler flags. * Fixed some set-but-not-used variables by creating dummy functions instead of using macros.
This commit is contained in:
+7
-6
@@ -145,13 +145,14 @@ CSTANDARD ?= -std=gnu89
|
||||
#build for release (default) or debug
|
||||
OPTIMIZATION ?= -Os
|
||||
DEBUGGING ?=
|
||||
WARNING_ALL := -Wall -Wextra -Wfloat-equal -Wconversion -Wparentheses
|
||||
WARNING_ALL += -pedantic -Wunused-parameter -Wunused-variable -Wreturn-type
|
||||
WARNING_ALL += -Wunused-function -Wreturn-type -Wunused-value
|
||||
WARNING_ALL += -Wswitch-default -Wuninitialized -Winit-self
|
||||
# enable all relevant warnings that find bugs
|
||||
WARNING_ALL := -Wall -Wextra -Wfloat-equal -Wconversion
|
||||
WARNING_ALL += -Wredundant-decls -Wswitch-default -pedantic
|
||||
# don't warn about conversion, sign, compares, long long and attributes
|
||||
# since they are common in embedded
|
||||
WARNING_ALL += -Wno-sign-conversion -Wno-conversion -Wno-sign-compare
|
||||
WARNING_ALL += -Wno-long-long -Wno-implicit-fallthrough -Wno-attributes
|
||||
#WARNING_ALL += -Wredundant-decls
|
||||
WARNING_ALL += -Wno-long-long -Wno-attributes
|
||||
WARNING_ALL += -Wno-implicit-fallthrough
|
||||
#WARNING_ALL += -Werror
|
||||
WARNINGS ?= $(WARNING_ALL)
|
||||
# dead code removal
|
||||
|
||||
Reference in New Issue
Block a user