From a17cc2838207fd949dc5ffd37b8ced5036e847e6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 8 Feb 2020 07:08:22 -0500 Subject: [PATCH] partial Revert of "Stricter compile options (#1132)" --- firmware/Makefile | 8 +++++--- firmware/rusefi_rules.mk | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/firmware/Makefile b/firmware/Makefile index 9342d8f8dd..d4b4afdcba 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -37,19 +37,21 @@ endif # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = $(EXTRA_PARAMS) $(DEBUG_LEVEL_OPT) $(RFLAGS) -fomit-frame-pointer -falign-functions=16 + USE_OPT = $(EXTRA_PARAMS) $(DEBUG_LEVEL_OPT) $(RFLAGS) -Wno-error=implicit-fallthrough -Wno-error=bool-operation -fomit-frame-pointer -falign-functions=16 -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes endif + USE_OPT += $(RUSEFI_OPT) # C specific options here (added to USE_OPT). ifeq ($(USE_COPT),) - USE_COPT = -fgnu89-inline -std=gnu99 -Wno-error=implicit-fallthrough + USE_COPT = -fgnu89-inline -std=gnu99 -Werror-implicit-function-declaration endif # C++ specific options here (added to USE_OPT). ifeq ($(USE_CPPOPT),) - USE_CPPOPT = -std=c++17 -Wno-register -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-use-cxa-atexit + # constexpr float expf_taylor_impl probably needs just c++14 but why not go with 17? + USE_CPPOPT = -std=c++17 -Wno-register -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits endif # Enable this if you want the linker to remove unused code and data diff --git a/firmware/rusefi_rules.mk b/firmware/rusefi_rules.mk index e23f9fb865..4232098583 100644 --- a/firmware/rusefi_rules.mk +++ b/firmware/rusefi_rules.mk @@ -1,5 +1,5 @@ -# Warnings-as-errors... -RUSEFI_OPT = -Werror +RUSEFI_OPT=-Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Werror=missing-field-initializers -# ...except these few -RUSEFI_OPT += -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter +RUSEFI_OPT+=-Wno-error=missing-prototypes + +RUSEFI_OPT+=-Werror=switch \ No newline at end of file