1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
From 686df1e3fb6a740281413ae0633003f8ffabcf6b Mon Sep 17 00:00:00 2001
From: Arjen Hiemstra <ahiemstra@heimr.nl>
Date: Thu, 20 Mar 2025 14:19:21 +0100
Subject: [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.
---
src/CMakeLists.txt | 2 +-
src/libwebpencoder.cpp | 7 -------
2 files changed, 1 insertion(+), 8 deletions(-)
--- 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)
--- a/src/libwebpencoder.cpp
+++ b/src/libwebpencoder.cpp
@@ -51,9 +51,6 @@ bool LibWebPEncoder::initialize(const QS
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::percentageToAbsolute
{
return quality.value_or(-1); // Already 0-100. -1 resets to default.
}
-
-void LibWebPEncoder::applyEncodingPreference([[maybe_unused]] AVDictionary *options)
-{
-}
|