Skip to content

Commit

Permalink
turn 'switch' errors into warnings to notify about unhandled values
Browse files Browse the repository at this point in the history
Many sections of the code rely on switches over the ControlType enum to
handle the different libcamera control types. When newer enum values are
added with newer versions of libcamera, the 'switch' errors (-Wall) will
prevent compilation even though the node will continue to work without
supporting the new types.

Relax this by turning all 'switch' errors into warnings again to notify
the developer and implement support for these new type enum values later.
  • Loading branch information
christianrauch committed Oct 20, 2024
1 parent 83df19c commit 056d610
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 @@ -5,6 +5,7 @@ set(CMAKE_CXX_STANDARD 17)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
add_compile_options(-Wno-error=switch)
add_link_options("-Wl,-z,relro,-z,now,-z,defs")
endif()

Expand Down

0 comments on commit 056d610

Please sign in to comment.