summaryrefslogtreecommitdiff
path: root/cmake-nRF5x
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2019-12-06 20:46:21 +0100
committerJF <jf@codingfield.com>2019-12-06 20:46:21 +0100
commit0db16bd8279826878e9d2d5ba63e21c4e15c35bf (patch)
tree1788d54e6b191deefc4f9809838ed67a661a7342 /cmake-nRF5x
parent5225706cc83a60647eea52d9ee28e7a4ee164aa4 (diff)
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...
Diffstat (limited to 'cmake-nRF5x')
-rwxr-xr-xcmake-nRF5x/CMake_nRF5x.cmake2
1 files changed, 1 insertions, 1 deletions
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}")