Silence Clang Wunused-const-variable

This commit is contained in:
Jonas Kvinge 2024-09-22 13:15:19 +02:00
parent 28a29d219e
commit c3008b4179
2 changed files with 18 additions and 0 deletions

View File

@ -64,6 +64,11 @@
using namespace Qt::StringLiterals;
using std::make_shared;
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-const-variable"
#endif
const char *GstEngine::kAutoSink = "autoaudiosink";
const char *GstEngine::kALSASink = "alsasink";
@ -85,6 +90,10 @@ constexpr qint64 kPreloadGapNanosec = 8000 * kNsecPerMsec; // 8s
constexpr qint64 kSeekDelayNanosec = 100 * kNsecPerMsec; // 100msec
} // namespace
#ifdef __clang_
# pragma clang diagnostic pop
#endif
GstEngine::GstEngine(SharedPtr<TaskManager> task_manager, QObject *parent)
: EngineBase(parent),
task_manager_(task_manager),

View File

@ -69,6 +69,11 @@
using namespace Qt::StringLiterals;
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-const-variable"
#endif
namespace {
constexpr int GST_PLAY_FLAG_VIDEO = 0x00000001;
@ -85,6 +90,10 @@ constexpr int kEqBandFrequencies[] = { 60, 170, 310, 600, 1000, 3000, 6000, 1200
} // namespace
#ifdef __clang_
# pragma clang diagnostic pop
#endif
int GstEnginePipeline::sId = 1;
GstEnginePipeline::GstEnginePipeline(QObject *parent)