Skip to content

Commit 499b52b

Browse files
committed
src/CMakeLists.txt,Makefile_v1,libsecutils: clean up setting of compiler warnings
1 parent 80fda0d commit 499b52b

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,10 @@ else()
310310
# GCC/Clang compiler flags
311311
add_compile_options(-pedantic) # -Werror is enabled only for development and CI, using Makefile_v1 without NDEBUG
312312
add_compile_options(
313-
-Wall -Woverflow -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wswitch
314-
-Wsign-compare -Wformat -Wtype-limits -Wundef -Wunused-parameter -Wformat-security
315-
-Wpointer-arith # -Wc99-extensions -Wlanguage-extension-token
316-
-Wconversion -Wshadow
317-
# TODO clean up code and re-enable warnings instead:
313+
-Wall -Woverflow -Wextra -Wswitch -Wmissing-prototypes -Wstrict-prototypes
314+
-Wsign-compare -Wformat -Wformat-security -Wtype-limits -Wundef
315+
-Wpointer-arith -Wunused-parameter # -Wc99-extensions -Wlanguage-extension-token
316+
-Wconversion -Wsign-conversion -Wshadow
318317
# Using here "no-" variants to cancel options potentially set in parent project(s):
319318
-Wno-declaration-after-statement -Wno-expansion-to-defined
320319
)

‎Makefile_src‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ endif
9191
override CFLAGS += $(DEBUG_FLAGS) -fstack-protector -fno-omit-frame-pointer
9292
# override CFLAGS += -std=gnu90 # TODO maybe clean up code and re-enable flag
9393
override CFLAGS += \
94-
-Wall -Woverflow -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wswitch \
95-
-Wsign-compare -Wformat -Wformat-security -Wtype-limits -Wundef -Wconversion \
96-
-Wpointer-arith -Wunused-parameter -Wshadow \
94+
-Wall -Woverflow -Wextra -Wswitch -Wmissing-prototypes -Wstrict-prototypes \
95+
-Wsign-compare -Wformat -Wformat-security -Wtype-limits -Wundef \
96+
-Wpointer-arith -Wunused-parameter \
97+
-Wconversion -Wsign-conversion -Wshadow \
9798
-pedantic -DPEDANTIC
98-
override CFLAGS +=-Wno-c99-extensions -Wno-language-extension-token -Wno-declaration-after-statement -Wno-expansion-to-defined
99+
# Using here "no-" variants to cancel options potentially set in parent project(s):
100+
override CFLAGS +=-Wno-declaration-after-statement -Wno-expansion-to-defined
99101
ifeq ($(LPATH),)
100102
ifndef GENCMP_NO_SECUTILS
101103
override CFLAGS += -I$(SECUTILS_DIR)/src/libsecutils/include

0 commit comments

Comments
 (0)