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:
parent
5225706cc8
commit
0db16bd827
5 changed files with 8 additions and 8 deletions
|
|
@ -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}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue