From 13a23f64710693597bf3f38ff49e7781031e8f9b Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Mon, 28 Aug 2023 15:00:32 +0200 Subject: [PATCH] plugins: Suppress warnings about implicit integer downcasts Returned values are usually 64-bit in length but commonly stored in 16-bit integers anyway. --- plugins/aja/CMakeLists.txt | 2 +- plugins/decklink/CMakeLists.txt | 1 + plugins/obs-ffmpeg/CMakeLists.txt | 1 + plugins/vlc-video/CMakeLists.txt | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/aja/CMakeLists.txt b/plugins/aja/CMakeLists.txt index 835034535..423d9d099 100644 --- a/plugins/aja/CMakeLists.txt +++ b/plugins/aja/CMakeLists.txt @@ -58,7 +58,7 @@ elseif(OS_MACOS) find_library(APPKIT AppKit) target_link_libraries(aja PRIVATE ${IOKIT} ${COREFOUNDATION} ${APPKIT}) - target_compile_options(aja PRIVATE -Wno-error=deprecated-declarations) + target_compile_options(aja PRIVATE -Wno-error=deprecated-declarations -Wno-shorten-64-to-32) elseif(OS_LINUX OR OS_FREEBSD) target_compile_options(aja PRIVATE -Wno-error=deprecated-declarations) endif() diff --git a/plugins/decklink/CMakeLists.txt b/plugins/decklink/CMakeLists.txt index e03ed1edf..e93c7c772 100644 --- a/plugins/decklink/CMakeLists.txt +++ b/plugins/decklink/CMakeLists.txt @@ -62,6 +62,7 @@ elseif(OS_MACOS) mark_as_advanced(COREFOUNDATION) target_sources(decklink PRIVATE mac/platform.cpp) + target_compile_options(decklink PRIVATE -Wno-shorten-64-to-32) target_link_libraries(decklink PRIVATE ${COREFOUNDATION}) target_sources( diff --git a/plugins/obs-ffmpeg/CMakeLists.txt b/plugins/obs-ffmpeg/CMakeLists.txt index 57851e171..04530ef39 100644 --- a/plugins/obs-ffmpeg/CMakeLists.txt +++ b/plugins/obs-ffmpeg/CMakeLists.txt @@ -45,6 +45,7 @@ target_sources( obs-ffmpeg-video-encoders.c obs-ffmpeg.c) +target_compile_options(obs-ffmpeg PRIVATE $<$:-Wno-shorten-64-to-32>) target_compile_definitions(obs-ffmpeg PRIVATE $<$:ENABLE_FFMPEG_LOGGING>) target_link_libraries( diff --git a/plugins/vlc-video/CMakeLists.txt b/plugins/vlc-video/CMakeLists.txt index e16093690..0a35ae284 100644 --- a/plugins/vlc-video/CMakeLists.txt +++ b/plugins/vlc-video/CMakeLists.txt @@ -31,6 +31,7 @@ add_library(vlc-video MODULE) add_library(OBS::vlc-video ALIAS vlc-video) target_sources(vlc-video PRIVATE vlc-video-plugin.c vlc-video-plugin.h vlc-video-source.c) +target_compile_options(vlc-video PRIVATE $<$:-Wno-shorten-64-to-32>) target_link_libraries(vlc-video PRIVATE OBS::libobs) check_vlc_path()