Add missing return statements which fix crashes in release mode.

Add flag to compiler so that it generates an error when a returning function does not return something...
This commit is contained in:
JF
2019-12-06 20:46:21 +01:00
parent 5225706cc8
commit 0db16bd827
5 changed files with 8 additions and 8 deletions

View File

@@ -88,7 +88,7 @@ macro(nRF5x_setup)
set(SOFTDEVICE_PATH "${NRF5_SDK_PATH}/components/softdevice/s132/hex/s132_nrf52_6.1.1_softdevice.hex")
endif ()
set(COMMON_FLAGS "-MP -MD -mthumb -mabi=aapcs -Wall -g3 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums ${CPU_FLAGS}")
set(COMMON_FLAGS "-MP -MD -mthumb -mabi=aapcs -Wall -g3 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums ${CPU_FLAGS} -Wreturn-type -Werror=return-type")
# compiler/assambler/linker flags
set(CMAKE_C_FLAGS "${COMMON_FLAGS}")