[Untested] fixed the compiler/linter options and fixed the corresponding code.

the code fixes have not been tested. some are trivial orthers might be a bit worrying.
This commit is contained in:
Marc
2022-10-05 13:55:04 +02:00
parent 561a2a90b8
commit 635b1adcaf
11 changed files with 40 additions and 35 deletions
+3 -3
View File
@@ -4,9 +4,9 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror -fsanitize=address")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -fsanitize=address -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-pointer-arith")
set(CMAKE_C_FLAGS_DEBUG "-g -Werror")
set(CMAKE_C_FLAGS_RELEASE "-O2")
# generate the compile_commands for vscode / clang
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")