Skip to content

Commit bce11b4

Browse files
Add a few extra GCC warning flags
1 parent 874d738 commit bce11b4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ set(C_STD gnu11)
1313
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
1414
message("Debug build")
1515
set(C_FLAGS_DEBUG " -O0 -g -fasynchronous-unwind-tables -fexceptions ")
16-
set(C_FLAGS_WARNINGS " -Wall -Wextra -pedantic -Werror -Wformat=2 -Wconversion -Wdouble-promotion ")
17-
#More flags to try (these report some new warnings): "-Wshadow -Wundef -Og"
16+
set(C_FLAGS_WARNINGS " -Wall -Wextra -pedantic -Werror -Wformat=2 -Wconversion -Wdouble-promotion \
17+
-Wcast-align -Wredundant-decls -Winline -Wdisabled-optimization -Wnested-externs ")
18+
#More flags to try (these report some new warnings!): -Og -Wshadow -Wundef -Wcast-qual
19+
# and some extras: -Wmissing-prototypes -Wmissing-declarations
20+
1821
#-DCMAKE_BUILD_TYPE=Release
1922
ELSE()
2023
message("Release build")

0 commit comments

Comments
 (0)