Skip to content

Commit

Permalink
Make sure non-void functions always return
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Jun 7, 2024
1 parent 5d5b20d commit 9424b8f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ if(NOT MSVC)
check_and_add_flag(CXX11_NARROWING_OFF -Wno-c++11-narrowing)
check_and_add_flag(OVERLOADED_VIRTUAL_OFF -Wno-overloaded-virtual)
check_and_add_flag(UNUSED_PARAMETER_OFF -Wno-unused-parameter)
check_and_add_flag(ALWAYS_RETURN -Werror=return-type)

# gcc uses some optimizations which might break stuff without this flag
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -fexceptions -Wno-shadow")
Expand Down

0 comments on commit 9424b8f

Please sign in to comment.