[PATCH] Tweak compiler warning flags to reduce unneeded output
authorArjen Hiemstra <ahiemstra@heimr.nl>
Thu, 20 Mar 2025 13:19:21 +0000 (14:19 +0100)
committerAurélien COUDERC <coucouf@debian.org>
Sun, 18 May 2025 22:58:37 +0000 (00:58 +0200)
-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

src/CMakeLists.txt
src/libwebpencoder.cpp

index 10d1a1193409d112b4ec7913290756ff480266e7..1ef842e7bbde4f7c694053ae4149dd97ab3eda0f 100644 (file)
@@ -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)
index 0006441ec7216c174171fb4b3c9e8cfcc475def9..c62cecbb6d0ea8dfce9d287de3101cecd24d02c2 100644 (file)
@@ -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<quint8> &qua
 {
     return quality.value_or(-1); // Already 0-100. -1 resets to default.
 }
-
-void LibWebPEncoder::applyEncodingPreference([[maybe_unused]] AVDictionary *options)
-{
-}