Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake/plugins: Enable -Wswitch on GCC #11437

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/linux/compilerconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set(
-Wno-unused-function
-Wno-unused-label
-Wparentheses
-Wswitch
-Wuninitialized
-Wunreachable-code
-Wunused-parameter
Expand Down
1 change: 1 addition & 0 deletions plugins/obs-nvenc/nvenc-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ const char *nv_error_name(NVENCSTATUS err)
RETURN_CASE(NV_ENC_ERR_RESOURCE_REGISTER_FAILED);
RETURN_CASE(NV_ENC_ERR_RESOURCE_NOT_REGISTERED);
RETURN_CASE(NV_ENC_ERR_RESOURCE_NOT_MAPPED);
RETURN_CASE(NV_ENC_ERR_NEED_MORE_OUTPUT);
}
#undef RETURN_CASE

Expand Down
7 changes: 7 additions & 0 deletions plugins/obs-qsv11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ target_sources(

target_compile_definitions(obs-qsv11 PRIVATE $<$<PLATFORM_ID:Windows>:DX11_D3D>)

target_compile_options(
obs-qsv11
PRIVATE
$<$<COMPILE_LANG_AND_ID:C,GNU,Clang>:-Wno-error=switch>
$<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wno-error=switch>
)

target_link_libraries(
obs-qsv11
PRIVATE
Expand Down
Loading