From 0db16bd8279826878e9d2d5ba63e21c4e15c35bf Mon Sep 17 00:00:00 2001 From: JF Date: Fri, 6 Dec 2019 20:46:21 +0100 Subject: 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... --- cmake-nRF5x/CMake_nRF5x.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake-nRF5x') diff --git a/cmake-nRF5x/CMake_nRF5x.cmake b/cmake-nRF5x/CMake_nRF5x.cmake index e2b3c068..29273e66 100755 --- a/cmake-nRF5x/CMake_nRF5x.cmake +++ b/cmake-nRF5x/CMake_nRF5x.cmake @@ -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}") -- cgit v1.2.3-70-g09d2