From: Arjen Hiemstra Date: Thu, 20 Mar 2025 13:19:21 +0000 (+0100) Subject: [PATCH] Tweak compiler warning flags to reduce unneeded output X-Git-Tag: archive/raspbian/6.3.6-1+rpi1^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0234c0eff451d5ee8b4d9b4dff816a1c5cc8c06e;p=kpipewire.git [PATCH] Tweak compiler warning flags to reduce unneeded output -Wno-gnu-statement-expression-from-macro-expansion and -Wno-c99-extensions are non-existent options that add more noise than they fix. Additionally, -Wpedantic is enabled by default which causes a lot of noise, so disable that. Finally, add -Wno-missing-field-initializers to quiet down the final bits of PipeWire API. Gbp-Pq: Name upstream_686df1e3_Tweak-compiler-warning-flags-to-reduce-unneeded-output.patch --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 05a395b..85115a8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -66,7 +66,7 @@ target_sources(KPipeWire PRIVATE ) # these are features pipewire use extensively and make it hard to look at compile logs -target_compile_options(KPipeWire PUBLIC -Wno-gnu-statement-expression-from-macro-expansion -Wno-zero-as-null-pointer-constant -Wno-c99-extensions -Wno-cast-align) +target_compile_options(KPipeWire PUBLIC -Wno-zero-as-null-pointer-constant -Wno-missing-field-initializers -Wno-cast-align -Wno-pedantic) target_link_libraries(KPipeWire PRIVATE Qt::Quick Qt::GuiPrivate KF6::I18n KF6::CoreAddons PkgConfig::PipeWire epoxy::epoxy PkgConfig::GBM Libdrm::Libdrm PkgConfig::LIBVA PkgConfig::LIBVA-drm) diff --git a/src/libwebpencoder.cpp b/src/libwebpencoder.cpp index 0006441..c62cecb 100644 --- a/src/libwebpencoder.cpp +++ b/src/libwebpencoder.cpp @@ -51,9 +51,6 @@ bool LibWebPEncoder::initialize(const QSize &size) m_avCodecContext->time_base = AVRational{1, 1000}; AVDictionary *options = nullptr; - - applyEncodingPreference(options); - if (int result = avcodec_open2(m_avCodecContext, codec, &options); result < 0) { qCWarning(PIPEWIRERECORD_LOGGING) << "Could not open codec" << av_err2str(result); return false; @@ -66,7 +63,3 @@ int LibWebPEncoder::percentageToAbsoluteQuality(const std::optional &qua { return quality.value_or(-1); // Already 0-100. -1 resets to default. } - -void LibWebPEncoder::applyEncodingPreference([[maybe_unused]] AVDictionary *options) -{ -}