posix-h4: add -Wall -Wextra

This commit is contained in:
Matthias Ringwald 2024-12-05 15:12:28 +01:00
parent 25c92c2437
commit 0f375d52f8

View File

@ -7,10 +7,10 @@ SET(BTSTACK_ROOT ${CMAKE_SOURCE_DIR}/../..)
# extra compiler warnings
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
# using Clang
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-variable -Wswitch-default -Werror")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-variable -Wswitch-default -Wall -Wextra -Werror")
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
# using GCC
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-but-set-variable -Wunused-variable -Wswitch-default -Werror")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-but-set-variable -Wunused-variable -Wswitch-default -Wall -Wextra -Werror")
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
# using Intel C++
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")