5 changes: 1 addition & 4 deletions mythtv/libs/libmyth/audio/audiooutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ AudioOutput *AudioOutput::OpenAudio(
}

AudioOutput *AudioOutput::OpenAudio(AudioSettings &settings,
bool willsuspendpa)
[[maybe_unused]] bool willsuspendpa)
{
QString &main_device = settings.m_mainDevice;
AudioOutput *ret = nullptr;
Expand Down Expand Up @@ -150,9 +150,6 @@ AudioOutput *AudioOutput::OpenAudio(AudioSettings &settings,
pulsestatus = PulseHandler::Suspend(PulseHandler::kPulseSuspend);
}
}
#else // !USING_PULSE
// Quiet warning error when not compiling with pulseaudio
Q_UNUSED(willsuspendpa);
#endif // USING_PULSE

if (main_device.startsWith("ALSA:"))
Expand Down
5 changes: 0 additions & 5 deletions mythtv/libs/libmyth/audio/audiooutputbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ AudioOutputBase::~AudioOutputBase()
assert(m_memoryCorruptionTest1 == 0xdeadbeef);
assert(m_memoryCorruptionTest2 == 0xdeadbeef);
assert(m_memoryCorruptionTest3 == 0xdeadbeef);
#else
Q_UNUSED(m_memoryCorruptionTest0);
Q_UNUSED(m_memoryCorruptionTest1);
Q_UNUSED(m_memoryCorruptionTest2);
Q_UNUSED(m_memoryCorruptionTest3);
#endif
}

Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmyth/audio/audiooutputbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,17 @@ class AudioOutputBase : public AudioOutput, public MThread

// All actual buffers
SRC_DATA m_srcData {};
uint m_memoryCorruptionTest0 {0xdeadbeef};
[[maybe_unused]] uint m_memoryCorruptionTest0 {0xdeadbeef};
alignas(16) std::array<float,kAudioSRCInputSize> m_srcInBuf {};
uint m_memoryCorruptionTest1 {0xdeadbeef};;
[[maybe_unused]] uint m_memoryCorruptionTest1 {0xdeadbeef};;
float *m_srcOut {nullptr};
int m_kAudioSRCOutputSize {0};
uint m_memoryCorruptionTest2 {0xdeadbeef};;
[[maybe_unused]] uint m_memoryCorruptionTest2 {0xdeadbeef};;
/**
* main audio buffer
*/
std::array<uchar,kAudioRingBufferSize> m_audioBuffer {0};
uint m_memoryCorruptionTest3 {0xdeadbeef};;
[[maybe_unused]] uint m_memoryCorruptionTest3 {0xdeadbeef};;
bool m_configureSucceeded {false};
std::chrono::milliseconds m_lengthLastData {0ms};

Expand Down
31 changes: 10 additions & 21 deletions mythtv/libs/libmyth/audio/audiooutputca.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,9 @@ bool AudioOutputCA::RenderAudio(unsigned char *aubuf,
}

// unneeded and unused in CA
void AudioOutputCA::WriteAudio(unsigned char *aubuf, int size)
void AudioOutputCA::WriteAudio([[maybe_unused]] unsigned char *aubuf,
[[maybe_unused]] int size)
{
(void)aubuf;
(void)size;
}

int AudioOutputCA::GetBufferedOnSoundcard(void) const
Expand Down Expand Up @@ -427,13 +426,10 @@ std::chrono::milliseconds AudioOutputCA::GetAudiotime(void)
OSStatus RenderCallbackAnalog(void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
[[maybe_unused]] UInt32 inBusNumber,
[[maybe_unused]] UInt32 inNumberFrames,
AudioBufferList *ioData)
{
(void)inBusNumber;
(void)inNumberFrames;

AudioOutputCA *inst = (static_cast<CoreAudioData *>(inRefCon))->mCA;

if (!inst->RenderAudio((unsigned char *)(ioData->mBuffers[0].mData),
Expand All @@ -447,10 +443,9 @@ OSStatus RenderCallbackAnalog(void *inRefCon,
return noErr;
}

int AudioOutputCA::GetVolumeChannel(int channel) const
int AudioOutputCA::GetVolumeChannel([[maybe_unused]] int channel) const
{
// FIXME: this only returns global volume
(void)channel;
Float32 volume;

if (!AudioUnitGetParameter(d->mOutputUnit,
Expand All @@ -461,19 +456,18 @@ int AudioOutputCA::GetVolumeChannel(int channel) const
return 0; // error case
}

void AudioOutputCA::SetVolumeChannel(int channel, int volume)
void AudioOutputCA::SetVolumeChannel([[maybe_unused]] int channel, int volume)
{
// FIXME: this only sets global volume
(void)channel;
AudioUnitSetParameter(d->mOutputUnit, kHALOutputParam_Volume,
kAudioUnitScope_Global, 0, (volume * 0.01F), 0);
}

// IOProc style callback for SPDIF audio output
static OSStatus RenderCallbackSPDIF(AudioDeviceID inDevice,
const AudioTimeStamp *inNow,
const void *inInputData,
const AudioTimeStamp *inInputTime,
static OSStatus RenderCallbackSPDIF([[maybe_unused]] AudioDeviceID inDevice,
[[maybe_unused]] const AudioTimeStamp *inNow,
[[maybe_unused]] const void *inInputData,
[[maybe_unused]] const AudioTimeStamp *inInputTime,
AudioBufferList *outOutputData,
const AudioTimeStamp *inOutputTime,
void *inRefCon)
Expand All @@ -482,11 +476,6 @@ static OSStatus RenderCallbackSPDIF(AudioDeviceID inDevice,
AudioOutputCA *a = d->mCA;
int index = d->mStreamIndex;

(void)inDevice; // unused
(void)inNow; // unused
(void)inInputData; // unused
(void)inInputTime; // unused

/*
* HACK: No idea why this would be the case, but after the second run, we get
* incorrect value
Expand Down
14 changes: 4 additions & 10 deletions mythtv/libs/libmyth/audio/audiooutputdx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,19 @@ using LPFNDSE = HRESULT (WINAPI *) (LPDSENUMCALLBACK, LPVOID);
#ifdef UNICODE
int CALLBACK AudioOutputDXPrivate::DSEnumCallback(LPGUID lpGuid,
LPCWSTR lpcstrDesc,
LPCWSTR lpcstrModule,
[[maybe_unused]] LPCWSTR lpcstrModule,
LPVOID lpContext)
{
QString enum_desc = QString::fromWCharArray( lpcstrDesc );
#else
int CALLBACK AudioOutputDXPrivate::DSEnumCallback(LPGUID lpGuid,
LPCSTR lpcstrDesc,
LPCSTR lpcstrModule,
[[maybe_unused]] LPCSTR lpcstrModule,
LPVOID lpContext)
{
QString enum_desc = QString::fromLocal8Bit( lpcstrDesc );

#endif
Q_UNUSED(lpcstrModule);

AudioOutputDXPrivate *context = static_cast<AudioOutputDXPrivate*>(lpContext);
const QString cfg_desc = context->m_device_name;
const int device_num = context->m_device_num;
Expand Down Expand Up @@ -576,10 +574,8 @@ int AudioOutputDX::GetBufferedOnSoundcard(void) const
return buffered;
}

int AudioOutputDX::GetVolumeChannel(int channel) const
int AudioOutputDX::GetVolumeChannel([[maybe_unused]] int channel) const
{
Q_UNUSED(channel);

HRESULT dsresult;
long dxVolume = 0;
int volume;
Expand All @@ -600,10 +596,8 @@ int AudioOutputDX::GetVolumeChannel(int channel) const
return volume;
}

void AudioOutputDX::SetVolumeChannel(int channel, int volume)
void AudioOutputDX::SetVolumeChannel([[maybe_unused]] int channel, int volume)
{
Q_UNUSED(channel);

HRESULT dsresult;
long dxVolume { DSBVOLUME_MIN };
if (volume > 0)
Expand Down
5 changes: 2 additions & 3 deletions mythtv/libs/libmyth/audio/audiooutputjack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,9 @@ void AudioOutputJACK::StopOutputThread(void)
}

// Don't need WriteAudio - this is only for the base class audio loop
void AudioOutputJACK::WriteAudio(unsigned char *aubuf, int size)
void AudioOutputJACK::WriteAudio([[maybe_unused]] unsigned char *aubuf,
[[maybe_unused]] int size)
{
(void)aubuf;
(void)size;
// unneeded and unused in JACK
}

Expand Down
10 changes: 4 additions & 6 deletions mythtv/libs/libmyth/audio/audiooutputwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,12 @@ class AudioOutputWinPrivate
HANDLE m_hEvent {nullptr};
};

void CALLBACK AudioOutputWinPrivate::waveOutProc(HWAVEOUT hwo, UINT uMsg,
void CALLBACK AudioOutputWinPrivate::waveOutProc([[maybe_unused]] HWAVEOUT hwo,
UINT uMsg,
DWORD dwInstance,
DWORD dwParam1, DWORD dwParam2)
[[maybe_unused]] DWORD dwParam1,
[[maybe_unused]] DWORD dwParam2)
{
Q_UNUSED(hwo);
Q_UNUSED(dwParam1);
Q_UNUSED(dwParam2);

if (uMsg != WOM_DONE)
return;

Expand Down
6 changes: 2 additions & 4 deletions mythtv/libs/libmythbase/bonjourregister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@ void BonjourRegister::socketReadyRead()
}


void BonjourRegister::BonjourCallback(DNSServiceRef ref, DNSServiceFlags flags,
void BonjourRegister::BonjourCallback([[maybe_unused]] DNSServiceRef ref,
[[maybe_unused]] DNSServiceFlags flags,
DNSServiceErrorType errorcode,
const char *name, const char *type,
const char *domain, void *object)
{
(void)ref;
(void)flags;

auto *bonjour = static_cast<BonjourRegister *>(object);
if (bonjour)
{
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythbase/dbutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ bool DBUtil::IsBackupInProgress(void)
* \param disableRotation Disable backup rotation
* \return MythDBBackupStatus indicating the result
*/
MythDBBackupStatus DBUtil::BackupDB(QString &filename, bool disableRotation)
MythDBBackupStatus DBUtil::BackupDB(QString &filename,
[[maybe_unused]] bool disableRotation)
{
filename = QString();

#ifdef _WIN32
Q_UNUSED(disableRotation);
LOG(VB_GENERAL, LOG_CRIT, "Database backups disabled on Windows.");
return kDB_Backup_Disabled;
#else
Expand Down
6 changes: 2 additions & 4 deletions mythtv/libs/libmythbase/http/mythhttpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ void MythHTTPServer::Init()
m_config.m_timeout = static_cast<std::chrono::milliseconds>(timeout * 1000);
}

void MythHTTPServer::Started(bool Tcp, bool Ssl)
void MythHTTPServer::Started([[maybe_unused]] bool Tcp,
[[maybe_unused]] bool Ssl)
{
#ifdef USING_LIBDNS_SD
// Advertise our webserver
Expand Down Expand Up @@ -217,9 +218,6 @@ void MythHTTPServer::Started(bool Tcp, bool Ssl)
m_bonjourSSL->Register(m_config.m_sslPort, QByteArrayLiteral("_https._tcp"),
QStringLiteral("%1 on %2").arg(QCoreApplication::applicationName(), host).toLatin1().constData(), {});
}
#else
Q_UNUSED(Tcp);
Q_UNUSED(Ssl);
#endif

// Build our list of hosts and allowed origins.
Expand Down
7 changes: 2 additions & 5 deletions mythtv/libs/libmythbase/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ void LoggingItem::setThreadTid(void)
m_tid = syscall(SYS_gettid);
#elif defined(__FreeBSD__)
long lwpid;
int dummy = thr_self( &lwpid );
(void)dummy;
[[maybe_unused]] int dummy = thr_self( &lwpid );
m_tid = (int64_t)lwpid;
#elif defined(Q_OS_DARWIN)
m_tid = (int64_t)mach_thread_self();
Expand Down Expand Up @@ -719,17 +718,15 @@ void loggingDeregisterThread(void)
/// \brief Map a syslog facility name back to the enumerated value
/// \param facility QString containing the facility name
/// \return Syslog facility as enumerated type. Negative if not found.
int syslogGetFacility(const QString& facility)
int syslogGetFacility([[maybe_unused]] const QString& facility)
{
#ifdef _WIN32
LOG(VB_GENERAL, LOG_NOTICE,
"Windows does not support syslog, disabling" );
Q_UNUSED(facility);
return( -2 );
#elif defined(Q_OS_ANDROID)
LOG(VB_GENERAL, LOG_NOTICE,
"Android does not support syslog, disabling" );
Q_UNUSED(facility);
return( -2 );
#else
const CODE *name = nullptr;
Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythbase/mythcdrom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ static uint32_t def_size(udfread_block_input *p_gen)
return (uint32_t)(p->m_file->GetRealFileSize() / UDF_BLOCK_SIZE);
}

static int def_read(udfread_block_input *p_gen, uint32_t lba, void *buf, uint32_t nblocks, int flags)
static int def_read(udfread_block_input *p_gen, uint32_t lba,
void *buf, uint32_t nblocks,
[[maybe_unused]] int flags)
{
(void)flags;
int result = -1;
auto *p = (blockInput_t *)p_gen;

Expand Down
8 changes: 2 additions & 6 deletions mythtv/libs/libmythbase/mythcorecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void MythCoreContext::setTestStringSettings(QMap<QString,QString> &overrides)

bool MythCoreContext::SetupCommandSocket(MythSocket *serverSock,
const QString &announcement,
std::chrono::milliseconds timeout,
[[maybe_unused]] std::chrono::milliseconds timeout,
bool &proto_mismatch)
{
proto_mismatch = false;
Expand All @@ -308,8 +308,6 @@ bool MythCoreContext::SetupCommandSocket(MythSocket *serverSock,
proto_mismatch = true;
return false;
}
#else
Q_UNUSED(timeout);
#endif

QStringList strlist(announcement);
Expand Down Expand Up @@ -1652,10 +1650,8 @@ void MythCoreContext::readyRead(MythSocket *sock)
while (sock->IsDataAvailable());
}

void MythCoreContext::connectionClosed(MythSocket *sock)
void MythCoreContext::connectionClosed([[maybe_unused]] MythSocket *sock)
{
(void)sock;

LOG(VB_GENERAL, LOG_NOTICE, LOC +
"Event socket closed. No connection to the backend.");

Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythbase/mythdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void DestroyMythDB(void)
MythDB::destroyMythDB();
}

MythDB *GetMythTestDB(const QString& testname)
MythDB *GetMythTestDB([[maybe_unused]] const QString& testname)
{
auto * db = MythDB::getMythDB();

Expand All @@ -71,7 +71,6 @@ MythDB *GetMythTestDB(const QString& testname)
QString("mythtv_%1.%2.sqlite3")
.arg(testname).arg(MythRandom(),8,16,QLatin1Char('0'));
#else
Q_UNUSED(testname);
params.m_dbName = ":memory:";
#endif
params.m_dbType = "QSQLITE";
Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythbase/mythmedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,8 @@ void MythMediaDevice::RegisterMediaExtensions(uint mediatype,
s_ext_to_media[ext] |= mediatype;
}

MythMediaError MythMediaDevice::eject(bool open_close)
MythMediaError MythMediaDevice::eject([[maybe_unused]] bool open_close)
{
(void) open_close;

#ifdef Q_OS_DARWIN
QString command = "diskutil eject " + m_devicePath;

Expand Down
9 changes: 4 additions & 5 deletions mythtv/libs/libmythbase/mythmiscutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ bool getUptime(std::chrono::seconds &uptime)
* \todo Memory Statistics are not supported (by MythTV) on NT or DOS.
* \return true if it succeeds, false otherwise.
*/
bool getMemStats(int &totalMB, int &freeMB, int &totalVM, int &freeVM)
bool getMemStats([[maybe_unused]] int &totalMB,
[[maybe_unused]] int &freeMB,
[[maybe_unused]] int &totalVM,
[[maybe_unused]] int &freeVM)
{
#ifdef __linux__
static constexpr size_t MB { 1024LL * 1024 };
Expand Down Expand Up @@ -159,10 +162,6 @@ bool getMemStats(int &totalMB, int &freeMB, int &totalVM, int &freeVM)
freeVM = (int)(free >> 10);
return true;
#else
Q_UNUSED(totalMB);
Q_UNUSED(freeMB);
Q_UNUSED(totalVM);
Q_UNUSED(freeVM);
return false;
#endif
}
Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythbase/netutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ bool insertInDB(RSSSite* site)
site->GetUpdated(), site->GetType());
}

bool insertInDB(const QString &name, const QString &sortname,
bool insertInDB(const QString &name,
[[maybe_unused]] const QString &sortname,
const QString &thumbnail,
const QString &description, const QString &url,
const QString &author, const bool download,
Expand All @@ -665,7 +666,7 @@ bool insertInDB(const QString &name, const QString &sortname,
"VALUES( :NAME, :THUMBNAIL, :DESCRIPTION, :URL, :AUTHOR, :DOWNLOAD, "
":UPDATED, :PODCAST, :TYPE);");
query.bindValue(":NAME", name);
Q_UNUSED(sortname); // query.bindValue(":SORTNAME", sortname);
// query.bindValue(":SORTNAME", sortname);
query.bindValue(":THUMBNAIL", thumbnail);
query.bindValue(":DESCRIPTION", description);
query.bindValue(":URL", url);
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythbase/referencecounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ void ReferenceCounter::PrintDebug(void)
void ReferenceCounter::PrintDebug(void) {}
#endif

ReferenceCounter::ReferenceCounter(const QString &debugName, bool logDebug) :
ReferenceCounter::ReferenceCounter([[maybe_unused]] const QString &debugName,
bool logDebug) :
#ifdef EXTRA_DEBUG
m_debugName(debugName),
#endif
m_logDebug(logDebug)
{
(void) debugName;
#ifdef LEAK_DEBUG
QWriteLocker locker(&leakLock);
leakMap[this] = LeakInfo(debugName);
Expand Down
12 changes: 5 additions & 7 deletions mythtv/libs/libmythbase/signalhandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ void SignalHandler::SetHandler(int signum, SigHandlerFunc handler)
s_singleton->SetHandlerPrivate(signum, handler);
}

void SignalHandler::SetHandlerPrivate(int signum, SigHandlerFunc handler)
void SignalHandler::SetHandlerPrivate([[maybe_unused]] int signum,
[[maybe_unused]] SigHandlerFunc handler)
{
#ifndef _WIN32
const char *signame = strsignal(signum);
Expand Down Expand Up @@ -180,9 +181,6 @@ void SignalHandler::SetHandlerPrivate(int signum, SigHandlerFunc handler)
}

LOG(VB_GENERAL, LOG_INFO, QString("Setup %1 handler").arg(signal_name));
#else
Q_UNUSED(signum);
Q_UNUSED(handler);
#endif
}

Expand All @@ -194,14 +192,14 @@ struct SignalInfo {
uint64_t m_value;
};

void SignalHandler::signalHandler(int signum, siginfo_t *info, void *context)
void SignalHandler::signalHandler(int signum,
[[maybe_unused]] siginfo_t *info,
[[maybe_unused]] void *context)
{
SignalInfo signalInfo {};

(void)context;
signalInfo.m_signum = signum;
#ifdef _WIN32
(void)info;
signalInfo.m_code = 0;
signalInfo.m_pid = 0;
signalInfo.m_uid = 0;
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythbase/test/test_template/test_template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ void TestTemplate::example_benchmark_test(void)
{
QBENCHMARK
{
int sum = 0;
[[maybe_unused]] int sum = 0;
for (int i = 0; i < 999; i++)
sum += i;
Q_UNUSED(sum);
}
}

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmetadata/metadatagrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ MetadataLookupList MetaGrabberScript::SearchSubtitle(const QString &title,
}

MetadataLookupList MetaGrabberScript::SearchSubtitle(const QString &inetref,
const QString &title, const QString &subtitle,
[[maybe_unused]] const QString &title,
const QString &subtitle,
MetadataLookup *lookup, bool passseas)
{
(void)title;
QStringList args;
SetDefaultArgs(args);

Expand Down
39 changes: 13 additions & 26 deletions mythtv/libs/libmythmetadata/metaio.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ class META_PUBLIC MetaIO
* \param mdata A pointer to a MusicMetadata object
* \returns Boolean to indicate success/failure.
*/
virtual bool writeVolatileMetadata(const QString & filename, MusicMetadata* mdata)
virtual bool writeVolatileMetadata([[maybe_unused]] const QString & filename,
[[maybe_unused]] MusicMetadata* mdata)
{
// These are here so that the parameters can be documented
// with doxygen.
(void) filename;
(void) mdata;
return false;
}

Expand Down Expand Up @@ -69,42 +66,33 @@ class META_PUBLIC MetaIO
* \param filename The filename to read images from.
* \returns the list of embedded images
*/
virtual AlbumArtList getAlbumArtList(const QString &filename)
virtual AlbumArtList getAlbumArtList([[maybe_unused]] const QString &filename)
{
(void)filename;
return {};
}

virtual bool writeAlbumArt(const QString &filename,
const AlbumArtImage *albumart)
virtual bool writeAlbumArt([[maybe_unused]] const QString &filename,
[[maybe_unused]] const AlbumArtImage *albumart)
{
(void)filename;
(void)albumart;
return false;
}

virtual bool removeAlbumArt(const QString &filename,
const AlbumArtImage *albumart)
virtual bool removeAlbumArt([[maybe_unused]] const QString &filename,
[[maybe_unused]] const AlbumArtImage *albumart)
{
(void)filename;
(void)albumart;
return false;
}

virtual bool changeImageType(const QString &filename,
const AlbumArtImage *albumart,
ImageType newType)
virtual bool changeImageType([[maybe_unused]] const QString &filename,
[[maybe_unused]] const AlbumArtImage *albumart,
[[maybe_unused]] ImageType newType)
{
(void)filename;
(void)albumart;
(void)newType;
return false;
}

virtual QImage *getAlbumArt(const QString &filename, ImageType type)
virtual QImage *getAlbumArt([[maybe_unused]] const QString &filename,
[[maybe_unused]] ImageType type)
{
(void)filename;
(void)type;
return nullptr;
}

Expand Down Expand Up @@ -133,9 +121,8 @@ class META_PUBLIC MetaIO

void readFromFilename(MusicMetadata *metadata);

virtual bool TagExists(const QString &filename)
virtual bool TagExists([[maybe_unused]] const QString &filename)
{
(void)filename;
return false;
}

Expand Down
13 changes: 4 additions & 9 deletions mythtv/libs/libmythmetadata/videoscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ namespace
m_imageExt.insert(ext.toLower());
}

DirectoryHandler *newDir(const QString &dir_name,
const QString &fq_dir_name) override // DirectoryHandler
DirectoryHandler *newDir([[maybe_unused]] const QString &dir_name,
[[maybe_unused]] const QString &fq_dir_name) override // DirectoryHandler
{
(void) dir_name;
(void) fq_dir_name;
return this;
}

void handleFile(const QString &file_name,
void handleFile([[maybe_unused]] const QString &file_name,
const QString &fq_file_name,
const QString &extension,
const QString &host) override // DirectoryHandler
Expand All @@ -59,7 +57,6 @@ namespace
LOG(VB_GENERAL, LOG_DEBUG,
QString("handleFile: %1 :: %2").arg(fq_file_name).arg(host));
#endif
(void) file_name;
if (m_imageExt.find(extension.toLower()) == m_imageExt.end())
{
m_videoFiles[fq_file_name].check = false;
Expand Down Expand Up @@ -229,10 +226,8 @@ void VideoScannerThread::run()


void VideoScannerThread::removeOrphans(unsigned int id,
const QString &filename)
[[maybe_unused]] const QString &filename)
{
(void) filename;

// TODO: use single DB connection for all calls
if (m_removeAll)
m_dbMetadata->purgeByID(id);
Expand Down
6 changes: 2 additions & 4 deletions mythtv/libs/libmythprotoserver/mythsocketmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ class PROTOSERVER_PUBLIC MythSocketManager : public QObject, public MythSocketCB

void readyRead(MythSocket *socket) override; // MythSocketCBs
void connectionClosed(MythSocket *socket) override; // MythSocketCBs
void connectionFailed(MythSocket *socket) override // MythSocketCBs
{ (void)socket; }
void connected(MythSocket *socket) override // MythSocketCBs
{ (void)socket; }
void connectionFailed([[maybe_unused]] MythSocket *socket) override {}; // MythSocketCBs
void connected([[maybe_unused]] MythSocket *socket) override {}; // MythSocketCBs

void SetThreadCount(uint count);

Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,14 @@ class HLSSegment
{
public:
HLSSegment(const std::chrono::seconds mduration, const int id, QString title,
QString uri, QString current_key_path)
QString uri, [[maybe_unused]] QString current_key_path)
: m_id(id),
m_duration(mduration), // Seconds
m_title(std::move(title)),
m_url(std::move(uri))
{
#ifdef USING_LIBCRYPTO
m_pszKeyPath = std::move(current_key_path);
#else
Q_UNUSED(current_key_path);
#endif
}

Expand Down
7 changes: 2 additions & 5 deletions mythtv/libs/libmythtv/HLS/m3u.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ namespace M3U
return true;
}

bool ParseKey(int version, const QString& line, bool& aesmsg,
bool ParseKey(int version, const QString& line,
[[maybe_unused]] bool& aesmsg,
const QString& loc, QString &path, QString &iv)
{
/*
Expand All @@ -285,10 +286,6 @@ namespace M3U
* methods are defined: NONE and AES-128.
*/

#ifndef USING_LIBCRYPTO
Q_UNUSED(aesmsg);
#endif

path.clear();
iv.clear();

Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythtv/captions/cc608decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ static std::array<const int,16> b1_to_service
-1, // 0xF
};

bool CC608Decoder::XDSDecode(int field, int b1, int b2)
bool CC608Decoder::XDSDecode([[maybe_unused]] int field, int b1, int b2)
{
if (field == 0)
return false; // XDS is only on second field
Expand All @@ -1128,8 +1128,6 @@ bool CC608Decoder::XDSDecode(int field, int b1, int b2)
.arg((CharCC(b2).unicode()>0x20) ? CharCC(b2) : QChar(' '))
.arg(field).arg(m_xds[field])
.arg(m_xdsCurService));
#else
(void) field;
#endif // DEBUG_XDS

if (m_xdsCurService < 0)
Expand Down
10 changes: 4 additions & 6 deletions mythtv/libs/libmythtv/captions/teletextreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,11 @@ void TeletextReader::PageUpdated(int page, int subpage)
}

void TeletextReader::HeaderUpdated(
int page, int subpage, tt_line_array& page_ptr, int lang)
[[maybe_unused]] int page,
[[maybe_unused]] int subpage,
[[maybe_unused]] tt_line_array& page_ptr,
[[maybe_unused]] int lang)
{
(void)page;
(void)subpage;
(void)page_ptr;
(void)lang;

if (!m_curpageShowHeader)
return;

Expand Down
9 changes: 3 additions & 6 deletions mythtv/libs/libmythtv/captions/teletextscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ void TeletextScreen::DrawLine(const tt_line_array& page, uint row, int lang)
SetBackgroundColor(bgcolor);

bool mosaic = false;
bool seperation = false;
[[maybe_unused]] bool seperation = false;
bool conceal = false;
bool flash = false;
[[maybe_unused]] bool flash = false;
bool doubleheight = false;
bool blink = false;
[[maybe_unused]] bool blink = false;
bool hold = false;
bool endbox = false;
bool startbox = false;
Expand Down Expand Up @@ -500,9 +500,6 @@ void TeletextScreen::DrawLine(const tt_line_array& page, uint row, int lang)
}
}
}
Q_UNUSED(seperation);
Q_UNUSED(flash);
Q_UNUSED(blink);
}

void TeletextScreen::DrawCharacter(int x, int y, QChar ch, bool doubleheight)
Expand Down
137 changes: 42 additions & 95 deletions mythtv/libs/libmythtv/cardutil.cpp

Large diffs are not rendered by default.

36 changes: 16 additions & 20 deletions mythtv/libs/libmythtv/channelscan/channelscanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,11 @@ DTVConfParser::return_t ChannelScanner::ImportDVBUtils(
return ret;
}

bool ChannelScanner::ImportM3U(uint cardid, const QString &inputname,
uint sourceid, bool is_mpts)
bool ChannelScanner::ImportM3U([[maybe_unused]] uint cardid,
[[maybe_unused]] const QString &inputname,
uint sourceid,
bool is_mpts)
{
(void) cardid;
(void) inputname;
m_sourceid = sourceid;

if (!m_scanMonitor)
Expand All @@ -354,8 +354,11 @@ bool ChannelScanner::ImportM3U(uint cardid, const QString &inputname,
return true;
}

bool ChannelScanner::ImportVBox(uint cardid, const QString &inputname, uint sourceid,
bool ftaOnly, ServiceRequirements serviceType)
bool ChannelScanner::ImportVBox([[maybe_unused]] uint cardid,
[[maybe_unused]] const QString &inputname,
uint sourceid,
[[maybe_unused]] bool ftaOnly,
[[maybe_unused]] ServiceRequirements serviceType)
{
m_sourceid = sourceid;
#ifdef USING_VBOX
Expand All @@ -371,13 +374,12 @@ bool ChannelScanner::ImportVBox(uint cardid, const QString &inputname, uint sour

return true;
#else
(void) cardid;
(void) inputname;
return false;
#endif
}

bool ChannelScanner::ImportExternRecorder(uint cardid, const QString &inputname,
bool ChannelScanner::ImportExternRecorder([[maybe_unused]] uint cardid,
[[maybe_unused]] const QString &inputname,
uint sourceid)
{
m_sourceid = sourceid;
Expand All @@ -397,15 +399,14 @@ bool ChannelScanner::ImportExternRecorder(uint cardid, const QString &inputname,

return true;
#else
(void) cardid;
(void) inputname;

return false;
#endif
}

bool ChannelScanner::ImportHDHR(uint cardid, const QString &inputname, uint sourceid,
ServiceRequirements serviceType)
bool ChannelScanner::ImportHDHR([[maybe_unused]] uint cardid,
[[maybe_unused]] const QString &inputname,
uint sourceid,
[[maybe_unused]] ServiceRequirements serviceType)
{
m_sourceid = sourceid;
#ifdef USING_HDHOMERUN
Expand All @@ -421,9 +422,6 @@ bool ChannelScanner::ImportHDHR(uint cardid, const QString &inputname, uint sour

return true;
#else
(void) cardid;
(void) inputname;
(void) serviceType;
return false;
#endif
}
Expand All @@ -433,7 +431,7 @@ void ChannelScanner::PreScanCommon(
uint cardid,
const QString &inputname,
uint sourceid,
bool do_ignore_signal_timeout,
[[maybe_unused]] bool do_ignore_signal_timeout,
bool do_test_decryption)
{
bool monitor_snr = false;
Expand Down Expand Up @@ -481,8 +479,6 @@ void ChannelScanner::PreScanCommon(

m_channel = new DVBChannel(device);
}
#else
(void)do_ignore_signal_timeout;
#endif

#ifdef USING_V4L2
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/channelscan/hdhrchannelfetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ hdhr_chan_map_t *getChannels(const QString& ip)
return result;
}

QString HDHRIPv4Address(const QString &device)
QString HDHRIPv4Address([[maybe_unused]] const QString &device)
{
#ifdef USING_HDHOMERUN
hdhomerun_device_t *hdhr =
Expand All @@ -172,7 +172,6 @@ QString HDHRIPv4Address(const QString &device)

return QString("%1.%2.%3.%4").arg(ipv4>>24&0xff).arg(ipv4>>16&0xff).arg(ipv4>>8&0xff).arg(ipv4&0xff);
#else
(void) device;
return {};
#endif
}
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/channelsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,8 @@ ChannelOptionsCommon::ChannelOptionsCommon(const ChannelID &id,
}
};

void ChannelOptionsCommon::onAirGuideChanged(bool fValue)
void ChannelOptionsCommon::onAirGuideChanged([[maybe_unused]] bool fValue)
{
(void)fValue;
}

void ChannelOptionsCommon::sourceChanged(const QString& sourceid)
Expand Down
5 changes: 1 addition & 4 deletions mythtv/libs/libmythtv/dbcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,10 @@ to check for duplicates in the BUSQ
*/
bool UpgradeTVDatabaseSchema(const bool upgradeAllowed,
const bool upgradeIfNoUI,
const bool informSystemd)
[[maybe_unused]] const bool informSystemd)
{
#ifdef IGNORE_SCHEMA_VER_MISMATCH
return true;
#endif
#if CONFIG_SYSTEMD_NOTIFY == 0
Q_UNUSED(informSystemd);
#endif
SchemaUpgradeWizard *schema_wizard = nullptr;

Expand Down
18 changes: 5 additions & 13 deletions mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1886,7 +1886,7 @@ void AvFormatDecoder::ScanDSMCCStreams(void)
desc += 2; // Skip data ID
while (desc != endDesc)
{
uint appTypeCode = desc[0]<<8 | desc[1];
[[maybe_unused]] uint appTypeCode = desc[0]<<8 | desc[1];
desc += 3; // Skip app type code and boot priority hint
uint appSpecDataLen = *desc++;
#ifdef USING_MHEG
Expand All @@ -1905,8 +1905,6 @@ void AvFormatDecoder::ScanDSMCCStreams(void)
}
}
else
#else
(void) appTypeCode;
#endif // USING_MHEG
{
desc += appSpecDataLen;
Expand Down Expand Up @@ -3742,10 +3740,8 @@ bool AvFormatDecoder::ProcessVideoFrame(AVStream *Stream, AVFrame *AvFrame)
* \sa CC608Decoder, TeletextDecoder
*/
void AvFormatDecoder::ProcessVBIDataPacket(
const AVStream *stream, const AVPacket *pkt)
[[maybe_unused]] const AVStream *stream, const AVPacket *pkt)
{
(void) stream;

const uint8_t *buf = pkt->data;
uint64_t linemask = 0;
std::chrono::microseconds utc = m_lastCcPtsu;
Expand Down Expand Up @@ -3884,7 +3880,8 @@ void AvFormatDecoder::ProcessDVBDataPacket(
/** \fn AvFormatDecoder::ProcessDSMCCPacket(const AVStream*, const AVPacket*)
* \brief Process DSMCC object carousel packet.
*/
void AvFormatDecoder::ProcessDSMCCPacket(const AVStream *str, const AVPacket *pkt)
void AvFormatDecoder::ProcessDSMCCPacket([[maybe_unused]] const AVStream *str,
[[maybe_unused]] const AVPacket *pkt)
{
#ifdef USING_MHEG
if (!m_itv && ! (m_itv = m_parent->GetInteractiveTV()))
Expand Down Expand Up @@ -3916,9 +3913,6 @@ void AvFormatDecoder::ProcessDSMCCPacket(const AVStream *str, const AVPacket *pk
length -= sectionLen;
data += sectionLen;
}
#else
Q_UNUSED(str);
Q_UNUSED(pkt);
#endif // USING_MHEG
}

Expand Down Expand Up @@ -4025,7 +4019,7 @@ bool AvFormatDecoder::ProcessRawTextPacket(AVPacket* Packet)
}

bool AvFormatDecoder::ProcessDataPacket(AVStream *curstream, AVPacket *pkt,
DecodeType decodetype)
[[maybe_unused]] DecodeType decodetype)
{
enum AVCodecID codec_id = curstream->codecpar->codec_id;

Expand All @@ -4046,8 +4040,6 @@ bool AvFormatDecoder::ProcessDataPacket(AVStream *curstream, AVPacket *pkt,
#ifdef USING_MHEG
if (!(decodetype & kDecodeVideo))
m_allowedQuit |= (m_itv && m_itv->ImageHasChanged());
#else
Q_UNUSED(decodetype);
#endif // USING_MHEG:
break;
}
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/decoders/avformatdecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ class AvFormatDecoder : public DecoderBase
bool IsLastFrameKey(void) const override { return false; } // DecoderBase

/// This is a No-op for this class.
void WriteStoredData(MythMediaBuffer *Buffer, bool storevid,
std::chrono::milliseconds timecodeOffset) override // DecoderBase
{ (void)Buffer; (void)storevid; (void)timecodeOffset;}
void WriteStoredData([[maybe_unused]] MythMediaBuffer *Buffer,
[[maybe_unused]] bool storevid,
[[maybe_unused]] std::chrono::milliseconds timecodeOffset) override {} // DecoderBase

/// This is a No-op for this class.
void SetRawAudioState(bool state) override { (void)state; } // DecoderBase
Expand Down
11 changes: 6 additions & 5 deletions mythtv/libs/libmythtv/decoders/mythcodeccontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ MythCodecContext::MythCodecContext(DecoderBase *Parent, MythCodecID CodecID)
{
}

MythCodecContext *MythCodecContext::CreateContext(DecoderBase *Parent, MythCodecID Codec)
MythCodecContext *MythCodecContext::CreateContext(DecoderBase *Parent,
[[maybe_unused]] MythCodecID Codec)
{
MythCodecContext *mctx = nullptr;
#ifdef USING_VAAPI
Expand Down Expand Up @@ -105,7 +106,6 @@ MythCodecContext *MythCodecContext::CreateContext(DecoderBase *Parent, MythCodec
if (codec_is_drmprime(Codec))
mctx = new MythDRMPRIMEContext(Parent, Codec);
#endif
Q_UNUSED(Codec);

if (!mctx)
mctx = new MythCodecContext(Parent, Codec);
Expand Down Expand Up @@ -243,8 +243,10 @@ void MythCodecContext::GetDecoders(RenderOptions &Opts, bool Reinit /*=false*/)
#endif
}

MythCodecID MythCodecContext::FindDecoder(const QString &Decoder, AVStream *Stream,
AVCodecContext **Context, const AVCodec **Codec)
MythCodecID MythCodecContext::FindDecoder(const QString &Decoder,
[[maybe_unused]] AVStream *Stream,
AVCodecContext **Context,
const AVCodec **Codec)
{
MythCodecID result = kCodec_NONE;
uint streamtype = mpeg_version((*Context)->codec_id);
Expand All @@ -260,7 +262,6 @@ MythCodecID MythCodecContext::FindDecoder(const QString &Decoder, AVStream *Stre
return result;
#endif
#ifdef USING_VTB
(void)Stream;
result = MythVTBContext::GetSupportedCodec(Context, Codec, Decoder, streamtype);
if (codec_is_vtb(result) || codec_is_vtb_dec(result))
return result;
Expand Down
43 changes: 16 additions & 27 deletions mythtv/libs/libmythtv/diseqc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,8 @@ bool DiSEqCDevTree::Store(uint cardid, const QString &device)
return true;
}

bool DiSEqCDevTree::SetTone(bool on) const
bool DiSEqCDevTree::SetTone([[maybe_unused]] bool on) const
{
(void) on;

bool success = false;

#ifdef USING_DVB
Expand Down Expand Up @@ -671,7 +669,9 @@ static bool send_diseqc(int fd, const dvb_diseqc_master_cmd cmd)
* \param data_len Length of optional data.
* \param data Pointer to optional data.
*/
bool DiSEqCDevTree::SendCommand(uint adr, uint cmd, uint repeats,
bool DiSEqCDevTree::SendCommand([[maybe_unused]] uint adr,
[[maybe_unused]] uint cmd,
[[maybe_unused]] uint repeats,
cmd_vec_t &data) const
{
// check payload validity
Expand All @@ -683,9 +683,6 @@ bool DiSEqCDevTree::SendCommand(uint adr, uint cmd, uint repeats,

#ifndef USING_DVB

(void) adr;
(void) cmd;
(void) repeats;
return false;

#else // if USING_DVB
Expand Down Expand Up @@ -1359,14 +1356,10 @@ void DiSEqCDevSwitch::SetNumPorts(uint num_ports)
m_numPorts = num_ports;
}

bool DiSEqCDevSwitch::ExecuteLegacy(const DiSEqCDevSettings &settings,
const DTVMultiplex &tuning,
uint pos)
bool DiSEqCDevSwitch::ExecuteLegacy([[maybe_unused]] const DiSEqCDevSettings &settings,
[[maybe_unused]] const DTVMultiplex &tuning,
[[maybe_unused]] uint pos)
{
(void) settings;
(void) tuning;
(void) pos;

#if defined(USING_DVB) && defined(FE_DISHNETWORK_SEND_LEGACY_CMD)
static const cmd_vec_t kSw21Cmds { 0x34, 0x65, };
static const cmd_vec_t kSw42Cmds { 0x46, 0x17, };
Expand Down Expand Up @@ -1512,12 +1505,10 @@ bool DiSEqCDevSwitch::ExecuteTone(const DiSEqCDevSettings &/*settings*/,
return false;
}

bool DiSEqCDevSwitch::ExecuteVoltage(const DiSEqCDevSettings &settings,
const DTVMultiplex &tuning, uint pos)
bool DiSEqCDevSwitch::ExecuteVoltage([[maybe_unused]] const DiSEqCDevSettings &settings,
[[maybe_unused]] const DTVMultiplex &tuning,
uint pos)
{
(void) settings;
(void) tuning;

LOG(VB_CHANNEL, LOG_INFO, LOC + "Changing to Voltage Switch port " +
QString("%1/2").arg(pos + 1));

Expand All @@ -1534,12 +1525,10 @@ bool DiSEqCDevSwitch::ExecuteVoltage(const DiSEqCDevSettings &settings,
return false;
}

bool DiSEqCDevSwitch::ExecuteMiniDiSEqC(const DiSEqCDevSettings &settings,
const DTVMultiplex &tuning, uint pos)
bool DiSEqCDevSwitch::ExecuteMiniDiSEqC([[maybe_unused]] const DiSEqCDevSettings &settings,
[[maybe_unused]] const DTVMultiplex &tuning,
uint pos)
{
(void) settings;
(void) tuning;

LOG(VB_CHANNEL, LOG_INFO, LOC + "Changing to MiniDiSEqC Switch port " +
QString("%1/2").arg(pos + 1));

Expand Down Expand Up @@ -2202,10 +2191,10 @@ bool DiSEqCDevSCR::PowerOff(void) const
return SendCommand(DISEQC_CMD_ODU, m_repeat, data);
}

bool DiSEqCDevSCR::SendCommand(uint cmd, uint repeats, cmd_vec_t &data) const
bool DiSEqCDevSCR::SendCommand(uint cmd,
[[maybe_unused]] uint repeats,
cmd_vec_t &data) const
{
(void) repeats;

// power on bus
if (!m_tree.SetVoltage(SEC_VOLTAGE_18))
return false;
Expand Down
6 changes: 2 additions & 4 deletions mythtv/libs/libmythtv/mpeg/AVCParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,17 +780,15 @@ void AVCParser::decode_SPS(BitReader& br)
8.2.1. The value of offset_for_non_ref_pic shall be in the
range of -231 to 231 - 1, inclusive.
*/
int offset_for_non_ref_pic = br.get_se_golomb();
(void) offset_for_non_ref_pic; // suppress unused var warning
[[maybe_unused]] int offset_for_non_ref_pic = br.get_se_golomb();

/*
offset_for_top_to_bottom_field is used to calculate the
picture order count of a bottom field as specified in
subclause 8.2.1. The value of offset_for_top_to_bottom_field
shall be in the range of -231 to 231 - 1, inclusive.
*/
int offset_for_top_to_bottom_field = br.get_se_golomb();
(void) offset_for_top_to_bottom_field; // suppress unused var warning
[[maybe_unused]] int offset_for_top_to_bottom_field = br.get_se_golomb();

/*
offset_for_ref_frame[ i ] is an element of a list of
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,9 @@ bool MPEGStreamData::CreatePMTSingleProgram(const ProgramMapTable &pmt)
/** \fn MPEGStreamData::IsRedundant(uint pid, const PSIPTable&) const
* \brief Returns true if table already seen.
*/
bool MPEGStreamData::IsRedundant(uint pid, const PSIPTable &psip) const
bool MPEGStreamData::IsRedundant([[maybe_unused]] uint pid,
const PSIPTable &psip) const
{
(void) pid;
const int table_id = psip.TableID();
const int version = psip.Version();

Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/mpeg/mpegtables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,8 @@ bool PSIPTable::VerifyPSIP(bool verify_crc) const
return true;
}

ProgramAssociationTable* ProgramAssociationTable::CreateBlank(bool smallPacket)
ProgramAssociationTable* ProgramAssociationTable::CreateBlank([[maybe_unused]] bool smallPacket)
{
(void) smallPacket; // currently always a small packet..
TSPacket *tspacket = TSPacket::CreatePayloadOnlyPacket();
auto *dst = tspacket->data() + sizeof(TSHeader) + 1; /* start of field pointer */
std::copy(DEFAULT_PAT_HEADER.cbegin(), DEFAULT_PAT_HEADER.cend(), dst);
Expand Down
14 changes: 5 additions & 9 deletions mythtv/libs/libmythtv/mythplayercaptionsui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ InteractiveTV* MythPlayerCaptionsUI::GetInteractiveTV()
* parameter. This is fine as long as there is only one signal/slot connection but
* I'm guessing won't work as well if signalled across threads.
*/
void MythPlayerCaptionsUI::ITVHandleAction(const QString &Action, bool& Handled)
void MythPlayerCaptionsUI::ITVHandleAction([[maybe_unused]] const QString &Action,
[[maybe_unused]] bool& Handled)
{
#ifdef USING_MHEG
if (!GetInteractiveTV())
Expand All @@ -558,14 +559,13 @@ void MythPlayerCaptionsUI::ITVHandleAction(const QString &Action, bool& Handled)

QMutexLocker locker(&m_itvLock);
Handled = m_interactiveTV->OfferKey(Action);
#else
Q_UNUSED(Action);
Q_UNUSED(Handled);
#endif
}

/// \brief Restart the MHEG/MHP engine.
void MythPlayerCaptionsUI::ITVRestart(uint Chanid, uint Cardid, bool IsLiveTV)
void MythPlayerCaptionsUI::ITVRestart([[maybe_unused]] uint Chanid,
[[maybe_unused]] uint Cardid,
[[maybe_unused]] bool IsLiveTV)
{
#ifdef USING_MHEG
if (!GetInteractiveTV())
Expand All @@ -574,10 +574,6 @@ void MythPlayerCaptionsUI::ITVRestart(uint Chanid, uint Cardid, bool IsLiveTV)
QMutexLocker locker(&m_itvLock);
m_interactiveTV->Restart(static_cast<int>(Chanid), static_cast<int>(Cardid), IsLiveTV);
m_itvVisible = false;
#else
Q_UNUSED(Chanid);
Q_UNUSED(Cardid);
Q_UNUSED(IsLiveTV);
#endif
}

Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/opengl/mythopengltonemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ MythOpenGLTonemap::~MythOpenGLTonemap()
m_colourSpace->DecrRef();
}

void MythOpenGLTonemap::UpdateColourSpace(bool PrimariesChanged)
void MythOpenGLTonemap::UpdateColourSpace([[maybe_unused]] bool PrimariesChanged)
{
(void)PrimariesChanged;
OpenGLLocker locker(m_render);
if (m_shader)
{
Expand Down
13 changes: 4 additions & 9 deletions mythtv/libs/libmythtv/opengl/mythvaapidrminterop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ static inline void VADRMtoPRIME(VADRMPRIMESurfaceDescriptor* VaDRM, AVDRMFrameDe
* for testing DRM PRIME functionality on desktops.
*/
std::vector<MythVideoTextureOpenGL*>
MythVAAPIInteropDRM::AcquirePrime(VASurfaceID Id,
MythRenderOpenGL* Context,
MythVideoFrame* Frame)
MythVAAPIInteropDRM::AcquirePrime([[maybe_unused]] VASurfaceID Id,
[[maybe_unused]] MythRenderOpenGL* Context,
[[maybe_unused]] MythVideoFrame* Frame)
{
std::vector<MythVideoTextureOpenGL*> result;

Expand All @@ -419,15 +419,11 @@ MythVAAPIInteropDRM::AcquirePrime(VASurfaceID Id,
if (!m_drmFrames.contains(Id))
return result;
result = CreateTextures(m_drmFrames[Id], Context, Frame, false);
#else
(void)Id;
(void)Context;
(void)Frame;
#endif
return result;
}

AVDRMFrameDescriptor* MythVAAPIInteropDRM::GetDRMFrameDescriptor(VASurfaceID Id)
AVDRMFrameDescriptor* MythVAAPIInteropDRM::GetDRMFrameDescriptor([[maybe_unused]] VASurfaceID Id)
{
#if VA_CHECK_VERSION(1, 1, 0)
INIT_ST;
Expand All @@ -442,7 +438,6 @@ AVDRMFrameDescriptor* MythVAAPIInteropDRM::GetDRMFrameDescriptor(VASurfaceID Id)
VADRMtoPRIME(&vadesc, drmdesc);
return drmdesc;
#else
(void)Id;
return nullptr;
#endif
}
Expand Down
24 changes: 8 additions & 16 deletions mythtv/libs/libmythtv/playercontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,26 +230,22 @@ QString PlayerContext::GetPreviousChannel(void) const
return preChan;
}

void PlayerContext::LockPlayingInfo(const char *file, int line) const
void PlayerContext::LockPlayingInfo([[maybe_unused]] const char *file,
[[maybe_unused]] int line) const
{
#if 0
LOG(VB_GENERAL, LOG_DEBUG, QString("LockPlayingInfo(%1,%2)")
.arg(file).arg(line));
#else
Q_UNUSED(file);
Q_UNUSED(line);
#endif
m_playingInfoLock.lock();
}

void PlayerContext::UnlockPlayingInfo(const char *file, int line) const
void PlayerContext::UnlockPlayingInfo([[maybe_unused]] const char *file,
[[maybe_unused]] int line) const
{
#if 0
LOG(VB_GENERAL, LOG_DEBUG, QString("UnlockPlayingInfo(%1,%2)")
.arg(file).arg(line));
#else
Q_UNUSED(file);
Q_UNUSED(line);
#endif
m_playingInfoLock.unlock();
}
Expand All @@ -259,29 +255,25 @@ void PlayerContext::UnlockPlayingInfo(const char *file, int line) const
* used to ensure player can only be deleted after
* osd in TV() is unlocked.
*/
void PlayerContext::LockDeletePlayer(const char *file, int line) const
void PlayerContext::LockDeletePlayer([[maybe_unused]] const char *file,
[[maybe_unused]] int line) const
{
#if 0
LOG(VB_GENERAL, LOG_DEBUG, QString("LockDeletePlayer(%1,%2)")
.arg(file).arg(line));
#else
Q_UNUSED(file);
Q_UNUSED(line);
#endif
m_deletePlayerLock.lock();
}

/**
* \brief allow player to be deleted.
*/
void PlayerContext::UnlockDeletePlayer(const char *file, int line) const
void PlayerContext::UnlockDeletePlayer([[maybe_unused]] const char *file,
[[maybe_unused]] int line) const
{
#if 0
LOG(VB_GENERAL, LOG_DEBUG, QString("UnlockDeletePlayer(%1,%2)")
.arg(file).arg(line));
#else
Q_UNUSED(file);
Q_UNUSED(line);
#endif
m_deletePlayerLock.unlock();
}
Expand Down
13 changes: 4 additions & 9 deletions mythtv/libs/libmythtv/recorders/ExternalStreamHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ ExternIO::~ExternIO(void)
delete[] m_buffer;
}

bool ExternIO::Ready(int fd, std::chrono::milliseconds timeout, const QString & what)
bool ExternIO::Ready([[maybe_unused]] int fd,
[[maybe_unused]] std::chrono::milliseconds timeout,
[[maybe_unused]] const QString & what)
{
#if !defined( USING_MINGW ) && !defined( _MSC_VER )
std::array<struct pollfd,2> m_poll {};
Expand Down Expand Up @@ -100,10 +102,6 @@ bool ExternIO::Ready(int fd, std::chrono::milliseconds timeout, const QString &
m_error = "poll overflow";
return false;
}
#else
Q_UNUSED(fd);
Q_UNUSED(timeout);
Q_UNUSED(what);
#endif // !defined( USING_MINGW ) && !defined( _MSC_VER )
return false;
}
Expand Down Expand Up @@ -242,16 +240,13 @@ bool ExternIO::Run(void)
}

/* Return true if the process is not, or is no longer running */
bool ExternIO::KillIfRunning(const QString & cmd)
bool ExternIO::KillIfRunning([[maybe_unused]] const QString & cmd)
{
#if defined(Q_OS_DARWIN) || defined(__FreeBSD__) || defined(__OpenBSD__)
Q_UNUSED(cmd);
return false;
#elif defined USING_MINGW
Q_UNUSED(cmd);
return false;
#elif defined( _MSC_VER )
Q_UNUSED(cmd);
return false;
#else
QString grp = QString("pgrep -x -f -- \"%1\" 2>&1 > /dev/null").arg(cmd);
Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythtv/recorders/HLS/HLSSegment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ HLSRecSegment::HLSRecSegment(int seq, std::chrono::seconds duration,
}

HLSRecSegment::HLSRecSegment(int seq, std::chrono::seconds duration, QString title,
QUrl uri, const QString& current_key_path)
QUrl uri, [[maybe_unused]] const QString& current_key_path)
: m_sequence(seq),
m_duration(duration),
m_title(std::move(title)),
Expand All @@ -38,8 +38,6 @@ HLSRecSegment::HLSRecSegment(int seq, std::chrono::seconds duration, QString tit
LOG(VB_RECORD, LOG_DEBUG, LOC + "ctor");
#ifdef USING_LIBCRYPTO
m_psz_key_path = current_key_path;
#else
Q_UNUSED(current_key_path);
#endif
}

Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/recorders/cetonrtsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@ bool CetonRTSP::Setup(ushort clientPort1, ushort clientPort2,
m_timeout = std::chrono::seconds(params["timeout"].toInt());
}

QString transport = readParameters("Transport", params);
Q_UNUSED(transport);
// QString transport = readParameters("Transport", params);
if (params.contains("ssrc"))
{
bool ok = false;
Expand Down
10 changes: 3 additions & 7 deletions mythtv/libs/libmythtv/recorders/channelbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ void ChannelBase::HandleScript(const QString &freqid)
}
}

bool ChannelBase::ChangeInternalChannel(const QString &freqid,
uint inputid) const
bool ChannelBase::ChangeInternalChannel([[maybe_unused]] const QString &freqid,
[[maybe_unused]] uint inputid) const
{
#ifdef USING_FIREWIRE
FirewireDevice *device = nullptr;
Expand Down Expand Up @@ -402,8 +402,6 @@ bool ChannelBase::ChangeInternalChannel(const QString &freqid,
device = nullptr;
return true;
#else
Q_UNUSED(freqid);
Q_UNUSED(inputid);
return false;
#endif
}
Expand Down Expand Up @@ -699,7 +697,7 @@ ChannelBase *ChannelBase::CreateChannel(
TVRec *tvrec,
const GeneralDBOptions &genOpt,
const DVBDBOptions &dvbOpt,
const FireWireDBOptions &fwOpt,
[[maybe_unused]] const FireWireDBOptions &fwOpt,
const QString &startchannel,
bool enter_power_save_mode,
QString &rbFileExt,
Expand All @@ -721,8 +719,6 @@ ChannelBase *ChannelBase::CreateChannel(
{
#ifdef USING_FIREWIRE
channel = new FirewireChannel(tvrec, genOpt.m_videoDev, fwOpt);
#else
Q_UNUSED(fwOpt);
#endif
}
#ifdef USING_HDHOMERUN
Expand Down
7 changes: 3 additions & 4 deletions mythtv/libs/libmythtv/recorders/dtvchannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,14 @@ class DTVChannel : public ChannelBase
/// This is only called when there is no frequency set. This is used
/// to implement "Channel Numbers" in analog tuning scenarios and to
/// implement "Virtual Channels" in the OCUR and Firewire tuners.
bool Tune(const QString &freqid, int finetune) override // ChannelBase
bool Tune([[maybe_unused]] const QString &freqid,
[[maybe_unused]] int finetune) override // ChannelBase
{
(void) freqid; (void) finetune;
return false;
}

virtual bool Tune(uint64_t frequency)
virtual bool Tune([[maybe_unused]] uint64_t frequency)
{
(void) frequency;
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/dummychannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DummyChannel : public ChannelBase
{
public:
explicit DummyChannel(TVRec *parent): ChannelBase(parent)
{ (void)parent; m_curChannelName.clear(); m_curInputName.clear(); }
{ m_curChannelName.clear(); m_curInputName.clear(); }
~DummyChannel(void) override = default;

bool IsTunable(const QString &/*channum*/) const override // ChannelBase
Expand Down
5 changes: 2 additions & 3 deletions mythtv/libs/libmythtv/recorders/dvbdev/dvbci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,9 @@ int cCiSession::SendData(int Tag, int Length, const uint8_t *Data)
return m_tc->SendData(buffer);
}

bool cCiSession::Process(int Length, const uint8_t *Data)
bool cCiSession::Process([[maybe_unused]] int Length,
[[maybe_unused]] const uint8_t *Data)
{
(void)Length;
(void)Data;
return true;
}

Expand Down
11 changes: 0 additions & 11 deletions mythtv/libs/libmythtv/recorders/firewirerecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,6 @@ bool FirewireRecorder::ProcessTSPacket(const TSPacket &tspacket)
return true;
}

void FirewireRecorder::SetOptionsFromProfile(RecordingProfile *profile,
const QString &videodev,
const QString &audiodev,
const QString &vbidev)
{
(void)videodev;
(void)audiodev;
(void)vbidev;
(void)profile;
}

// documented in recorderbase.cpp
bool FirewireRecorder::PauseAndWait(std::chrono::milliseconds timeout)
{
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythtv/recorders/firewirerecorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ class FirewireRecorder :
bool ProcessTSPacket(const TSPacket &tspacket) override; // DTVRecorder

// Sets
void SetOptionsFromProfile(RecordingProfile *profile,
const QString &videodev,
const QString &audiodev,
const QString &vbidev) override; // DTVRecorder
void SetOptionsFromProfile([[maybe_unused]] RecordingProfile *profile,
[[maybe_unused]] const QString &videodev,
[[maybe_unused]] const QString &audiodev,
[[maybe_unused]] const QString &vbidev) override {}; // DTVRecorder

protected:
void InitStreamData(void) override; // DTVRecorder
Expand Down
10 changes: 3 additions & 7 deletions mythtv/libs/libmythtv/recorders/importrecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,11 @@
#define LOC QString("ImportRec[%1](%2): ") \
.arg(TVREC_CARDNUM, m_videodevice)

void ImportRecorder::SetOptionsFromProfile(RecordingProfile *profile,
void ImportRecorder::SetOptionsFromProfile([[maybe_unused]] RecordingProfile *profile,
const QString &videodev,
const QString &audiodev,
const QString &vbidev)
[[maybe_unused]] const QString &audiodev,
[[maybe_unused]] const QString &vbidev)
{
(void)audiodev;
(void)vbidev;
(void)profile;

QString testVideoDev = videodev;

if (videodev.startsWith("file:", Qt::CaseInsensitive))
Expand Down
7 changes: 2 additions & 5 deletions mythtv/libs/libmythtv/recorders/mpegrecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,9 @@ void MpegRecorder::SetOption(const QString &opt, const QString &value)

void MpegRecorder::SetOptionsFromProfile(RecordingProfile *profile,
const QString &videodev,
const QString &audiodev,
const QString &vbidev)
[[maybe_unused]] const QString &audiodev,
[[maybe_unused]] const QString &vbidev)
{
(void)audiodev;
(void)vbidev;

if (videodev.startsWith("file:", Qt::CaseInsensitive))
{
m_deviceIsMpegFile = true;
Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/recorders/recorderbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,8 @@ bool RecorderBase::IsRecordingRequested(void)
* \param clear if true any generated timecodes should be reset.
* \sa Unpause(), WaitForPause()
*/
void RecorderBase::Pause(bool clear)
void RecorderBase::Pause([[maybe_unused]] bool clear)
{
(void) clear;
QMutexLocker locker(&m_pauseLock);
m_requestPause = true;
}
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/recorders/rtp/rtppacketbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ void RTPPacketBuffer::PushDataPacket(const UDPPacket &udp_packet)
}

void RTPPacketBuffer::PushFECPacket(
const UDPPacket &packet, uint fec_stream_num)
const UDPPacket &packet,
[[maybe_unused]] uint fec_stream_num)
{
(void) fec_stream_num;
// TODO IMPLEMENT
// for now just free the packet for immediate reuse
FreePacket(packet);
Expand Down
9 changes: 3 additions & 6 deletions mythtv/libs/libmythtv/recorders/signalmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,11 @@ extern "C" {
HDHRSignalMonitor, SignalMonitorValue
*/

SignalMonitor *SignalMonitor::Init(const QString& cardtype, int db_cardnum,
ChannelBase *channel,
SignalMonitor *SignalMonitor::Init([[maybe_unused]] const QString& cardtype,
[[maybe_unused]] int db_cardnum,
[[maybe_unused]] ChannelBase *channel,
bool release_stream)
{
(void) cardtype;
(void) db_cardnum;
(void) channel;

SignalMonitor *signalMonitor = nullptr;

if (cardtype == "GuaranteedToFail")
Expand Down
8 changes: 2 additions & 6 deletions mythtv/libs/libmythtv/recorders/streamhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void StreamHandler::WriteMPTS(const unsigned char * buffer, uint len)
m_mptsTfw->Write(buffer, len);
}

bool StreamHandler::AddNamedOutputFile(const QString &file)
bool StreamHandler::AddNamedOutputFile([[maybe_unused]] const QString &file)
{
#if !defined( USING_MINGW ) && !defined( _MSC_VER )
QMutexLocker lk(&m_mptsLock);
Expand Down Expand Up @@ -397,13 +397,11 @@ bool StreamHandler::AddNamedOutputFile(const QString &file)
.arg(m_mptsBaseFile, fn));
}
}
#else
Q_UNUSED(file);
#endif // !defined( USING_MINGW ) && !defined( _MSC_VER )
return true;
}

void StreamHandler::RemoveNamedOutputFile(const QString &file)
void StreamHandler::RemoveNamedOutputFile([[maybe_unused]] const QString &file)
{
#if !defined( USING_MINGW ) && !defined( _MSC_VER )
QMutexLocker lk(&m_mptsLock);
Expand All @@ -418,7 +416,5 @@ void StreamHandler::RemoveNamedOutputFile(const QString &file)
m_mptsTfw = nullptr;
}
}
#else
Q_UNUSED(file);
#endif // !defined( USING_MINGW ) && !defined( _MSC_VER )
}
7 changes: 2 additions & 5 deletions mythtv/libs/libmythtv/recorders/v4l2encrecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,11 @@ void V4L2encRecorder::SetStrOption(RecordingProfile *profile, const QString &nam

void V4L2encRecorder::SetOptionsFromProfile(RecordingProfile *profile,
const QString &videodev,
const QString &audiodev,
const QString &vbidev)
[[maybe_unused]] const QString &audiodev,
[[maybe_unused]] const QString &vbidev)
{
LOG(VB_GENERAL, LOG_INFO, LOC + "SetOptionsFromProfile() -- begin"); //debugging

(void)audiodev;
(void)vbidev;

SetOption("videodevice", videodev);
SetOption("vbidevice", vbidev);
SetOption("audiodevice", audiodev);
Expand Down
24 changes: 9 additions & 15 deletions mythtv/libs/libmythtv/recorders/vbitext/vbi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,11 @@ vbi_line(struct vbi *vbi, const unsigned char *p)
// called when new vbi data is waiting

void
vbi_handler(struct vbi *vbi, int fd)
vbi_handler(struct vbi *vbi, [[maybe_unused]] int fd)
{
int n = 0;
unsigned int seq = 0;

(void)fd;

n = read(vbi->fd, rawbuf, vbi->bufsize);

if (dl_empty(vbi->clients))
Expand Down Expand Up @@ -545,7 +543,7 @@ set_decode_parms(struct vbi *vbi, struct v4l2_vbi_format *p)
#endif // USING_V4L2

static int
setup_dev(struct vbi *vbi)
setup_dev([[maybe_unused]] struct vbi *vbi)
{
#ifdef USING_V4L2
struct v4l2_format v4l2_format {};
Expand Down Expand Up @@ -581,21 +579,21 @@ setup_dev(struct vbi *vbi)

return 0;
#else
(void)vbi;
return -1;
#endif // USING_V4L2
}



struct vbi *
vbi_open(const char *vbi_dev_name, struct cache *ca, int fine_tune, int big_buf)
vbi_open(const char *vbi_dev_name,
[[maybe_unused]] struct cache *ca,
int fine_tune,
int big_buf)
{
static int s_inited = 0;
struct vbi *vbi = nullptr;

(void)ca;

if (! s_inited)
lang_init();
s_inited = 1;
Expand Down Expand Up @@ -652,14 +650,13 @@ vbi_close(struct vbi *vbi)


struct vt_page *
vbi_query_page(struct vbi *vbi, int pgno, int subno)
vbi_query_page([[maybe_unused]] struct vbi *vbi,
[[maybe_unused]] int pgno,
[[maybe_unused]] int subno)
{
#ifdef IMPLEMENTED
struct vt_page *vtp = 0;

(void)pgno;
(void)subno;

if (vbi->cache)
vtp = vbi->cache->op->get(vbi->cache, pgno, subno);
if (vtp == 0)
Expand All @@ -671,9 +668,6 @@ vbi_query_page(struct vbi *vbi, int pgno, int subno)
vbi_send(vbi, EV_PAGE, 1, 0, 0, vtp);
return vtp;
#else
(void)vbi;
(void)pgno;
(void)subno;
return nullptr;
#endif
}
Expand Down
12 changes: 3 additions & 9 deletions mythtv/libs/libmythtv/recordingprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ class AudioCompressionSettings : public GroupSetting
{
public:
AudioCompressionSettings(const RecordingProfile &parentProfile,
V4L2util* v4l2) :
[[maybe_unused]] V4L2util* v4l2) :
m_parent(parentProfile)
{
setName(QObject::tr("Audio Quality"));
Expand Down Expand Up @@ -511,8 +511,6 @@ class AudioCompressionSettings : public GroupSetting
}
}
}
#else
Q_UNUSED(v4l2);
#endif // USING_V4L2
}

Expand Down Expand Up @@ -895,7 +893,7 @@ class VideoCompressionSettings : public GroupSetting
{
public:
VideoCompressionSettings(const RecordingProfile &parentProfile,
V4L2util* v4l2) :
[[maybe_unused]] V4L2util* v4l2) :
m_parent(parentProfile)
{
setName(QObject::tr("Video Compression"));
Expand Down Expand Up @@ -1127,8 +1125,6 @@ class VideoCompressionSettings : public GroupSetting
}
}
}
#else
Q_UNUSED(v4l2);
#endif // USING_V4L2
}

Expand Down Expand Up @@ -1486,7 +1482,7 @@ void RecordingProfile::FiltersChanged(const QString &val)
}

bool RecordingProfile::loadByType(const QString &name, const QString &card,
const QString &videodev)
[[maybe_unused]] const QString &videodev)
{
QString hostname = gCoreContext->GetHostName().toLower();
QString cardtype = card;
Expand All @@ -1499,8 +1495,6 @@ bool RecordingProfile::loadByType(const QString &name, const QString &card,
if (m_v4l2util->IsOpen())
cardtype = m_v4l2util->ProfileName();
}
#else
Q_UNUSED(videodev);
#endif

MSqlQuery result(MSqlQuery::InitCon());
Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythtv/tv_rec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2780,14 +2780,12 @@ void TVRec::InitAutoRunJobs(RecordingInfo *rec, AutoRunInitType t,
* RecStatus::Cancelled, and set to -1 to base the decision of the recording
* group.
*/
void TVRec::SetLiveRecording(int recording)
void TVRec::SetLiveRecording([[maybe_unused]] int recording)
{
LOG(VB_GENERAL, LOG_INFO, LOC +
QString("SetLiveRecording(%1)").arg(recording));
QMutexLocker locker(&m_stateChangeLock);

(void) recording;

RecStatus::Type recstat = RecStatus::Cancelled;
bool was_rec = m_pseudoLiveTVRecording;
CheckForRecGroupChange();
Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythtv/videoout_d3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,10 @@ bool VideoOutputD3D::CreatePauseFrame(void)
return true;
}

void VideoOutputD3D::RenderFrame(MythVideoFrame *buffer, FrameScanType t, OSD *osd)
void VideoOutputD3D::RenderFrame(MythVideoFrame *buffer,
FrameScanType t,
[[maybe_unused]] OSD *osd)
{
(void)osd;
if (IsErrored())
{
LOG(VB_GENERAL, LOG_ERR, LOC +
Expand Down
27 changes: 8 additions & 19 deletions mythtv/libs/libmythtv/videosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,11 +829,9 @@ class VideoDevice : public CaptureCardComboBoxSetting
* \param dir The directory to open and search for devices.
* \param absPath Ignored. The function always uses absolute paths.
*/
void fillSelectionsFromDir(const QDir &dir, bool absPath = true)
void fillSelectionsFromDir(const QDir &dir,
[[maybe_unused]] bool absPath = true)
{
// Needed to make both compiler and doxygen happy.
(void) absPath;

fillSelectionsFromDir(dir, 0, 255, QString(), QRegularExpression(), false);
}

Expand Down Expand Up @@ -940,11 +938,9 @@ class VBIDevice : public CaptureCardComboBoxSetting
* \param dir The directory to open and search for devices.
* \param absPath Ignored. The function always uses absolute paths.
*/
void fillSelectionsFromDir(const QDir &dir, bool absPath = true)
void fillSelectionsFromDir(const QDir &dir,
[[maybe_unused]] bool absPath = true)
{
// Needed to make both compiler and doxygen happy.
(void) absPath;

fillSelectionsFromDir(dir, QString(), QString());
}

Expand Down Expand Up @@ -1326,21 +1322,17 @@ FirewireModel::FirewireModel(const CaptureCard &parent,
setHelpText(help);
}

void FirewireModel::SetGUID(const QString &_guid)
void FirewireModel::SetGUID([[maybe_unused]] const QString &_guid)
{
(void) _guid;

#ifdef USING_FIREWIRE
AVCInfo info = m_guid->GetAVCInfo(_guid);
QString model = FirewireDevice::GetModelName(info.m_vendorid, info.m_modelid);
setValue(std::max(getValueIndex(model), 0));
#endif // USING_FIREWIRE
}

void FirewireDesc::SetGUID(const QString &_guid)
void FirewireDesc::SetGUID([[maybe_unused]] const QString &_guid)
{
(void) _guid;

setLabel(tr("Description"));

#ifdef USING_FIREWIRE
Expand Down Expand Up @@ -1909,7 +1901,7 @@ ASIConfigurationGroup::ASIConfigurationGroup(CaptureCard& a_parent,
probeCard(m_device->getValue());
};

void ASIConfigurationGroup::probeCard(const QString &device)
void ASIConfigurationGroup::probeCard([[maybe_unused]] const QString &device)
{
#ifdef USING_ASI
if (device.isEmpty())
Expand All @@ -1935,7 +1927,6 @@ void ASIConfigurationGroup::probeCard(const QString &device)
}
m_cardInfo->setValue(tr("Valid DVEO ASI card"));
#else
Q_UNUSED(device);
m_cardInfo->setValue(QString("Not compiled with ASI support"));
#endif
}
Expand Down Expand Up @@ -2471,7 +2462,7 @@ V4L2encGroup::V4L2encGroup(CaptureCard &parent, CardType& cardtype) :
probeCard(device_name);
}

void V4L2encGroup::probeCard(const QString &device_name)
void V4L2encGroup::probeCard([[maybe_unused]] const QString &device_name)
{
#ifdef USING_V4L2
QString card_name = tr("Failed to open");
Expand Down Expand Up @@ -2518,8 +2509,6 @@ void V4L2encGroup::probeCard(const QString &device_name)
m_device->addTargetedChild(m_driverName,
new ChannelTimeout(m_parent, 15s, 2s));
}
#else
Q_UNUSED(device_name);
#endif // USING_V4L2
}

Expand Down
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/videosource.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ static inline bool is_grabber_external(const QString &grabber)
grabber == "/bin/true");
}

static inline bool is_grabber_labs(const QString &grabber)
static inline bool is_grabber_labs([[maybe_unused]] const QString &grabber)
{
Q_UNUSED(grabber);
return false;
}

Expand Down
5 changes: 1 addition & 4 deletions mythtv/libs/libmythtv/visualisations/goom/filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ getAsmUse ()
void
zoomFilterFastRGB (Uint * pix1, Uint * pix2, ZoomFilterData * zf, Uint resx, Uint resy, int switchIncr, float switchMult)
{
static unsigned char s_pertedec = 8;
[[maybe_unused]] static unsigned char s_pertedec = 8;
static char s_firstTime = 1;

static constexpr int8_t INTERLACE_INCR { 16 };
Expand Down Expand Up @@ -547,9 +547,6 @@ zoomFilterFastRGB (Uint * pix1, Uint * pix2, ZoomFilterData * zf, Uint resx, Uin
noisify = zf->noisify;
}

/* Silence a gcc warning */
(void)s_pertedec;

/** generation d'un effet **/
if (s_firstTime || zf) {

Expand Down
5 changes: 1 addition & 4 deletions mythtv/libs/libmythtv/visualisations/goom/surf3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,10 @@ void surf3d_draw (surf3d *s, int color, int dist, int *buf, int *back, int W,int
for (int i=0;i<s->nbvertex;i++) {
V3D_TO_V2D(s->svertex[i],v2,W,H,dist);
int *p1 = buf + v2.x + (v2.y*static_cast<ptrdiff_t>(W));
int *p2 = back + v2.x + (v2.y*static_cast<ptrdiff_t>(W));
[[maybe_unused]] int *p2 = back + v2.x + (v2.y*static_cast<ptrdiff_t>(W));
if ((v2.x>=0) && (v2.y>=0) && (v2.x<W) && (v2.y<H)) {
*p1 = color;
}

/* Squelch a gcc warning */
(void)p2;
}
}

Expand Down
21 changes: 8 additions & 13 deletions mythtv/libs/libmythtv/visualisations/goom/zoom_filter_mmx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,15 @@ int zoom_filter_mmx_supported () {
return 0;
}

void zoom_filter_mmx (int prevX, int prevY,
const unsigned int *expix1, unsigned int *expix2,
const int *brutS, const int *brutD, int buffratio,
const GoomCoefficients &precalCoef)
void zoom_filter_mmx ([[maybe_unused]] int prevX,
[[maybe_unused]] int prevY,
[[maybe_unused]] const unsigned int *expix1,
[[maybe_unused]] unsigned int *expix2,
[[maybe_unused]] const int *brutS,
[[maybe_unused]] const int *brutD,
[[maybe_unused]] int buffratio,
[[maybe_unused]] const GoomCoefficients &precalCoef)
{
(void)prevX;
(void)prevY;
(void)expix1;
(void)expix2;
(void)brutS;
(void)brutD;
(void)buffratio;
(void)precalCoef;
return;
}

#endif
Expand Down
16 changes: 8 additions & 8 deletions mythtv/libs/libmythtv/visualisations/goom/zoom_filter_xmmx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ void zoom_filter_xmmx (int prevX, int prevY,
int zoom_filter_xmmx_supported () {
return 0;
}
void zoom_filter_xmmx (int prevX, int prevY,
unsigned int *expix1, unsigned int *expix2,//NOLINT(readability-non-const-parameter)
const int *brutS, const int *brutD, int buffratio,
GoomCoefficients& precalCoef)
void zoom_filter_xmmx ([[maybe_unused]] int prevX,
[[maybe_unused]] int prevY,
[[maybe_unused]] unsigned int *expix1,
[[maybe_unused]] unsigned int *expix2,
[[maybe_unused]] const int *brutS,
[[maybe_unused]] const int *brutD,
[[maybe_unused]] int buffratio,
[[maybe_unused]] GoomCoefficients& precalCoef)
{
(void) prevX; (void) prevY;
(void) expix1; (void) expix2;
(void) brutS; (void) brutD;
(void) buffratio; (void) precalCoef;
}
#endif
10 changes: 3 additions & 7 deletions mythtv/libs/libmythtv/vulkan/mythvideotexturevulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,12 @@ void MythVideoTextureVulkan::DeleteTexture(MythVulkanObject* Vulkan,
}

std::vector<MythVideoTextureVulkan*>
MythVideoTextureVulkan::CreateSoftwareTextures(MythVulkanObject* Vulkan,
VkCommandBuffer CommandBuffer,
VideoFrameType Type,
MythVideoTextureVulkan::CreateSoftwareTextures([[maybe_unused]] MythVulkanObject* Vulkan,
[[maybe_unused]] VkCommandBuffer CommandBuffer,
[[maybe_unused]] VideoFrameType Type,
VideoFrameType Format,
QSize Size)
{
(void)Vulkan;
(void)CommandBuffer;
(void)Type;

std::vector<MythVideoTextureVulkan*> result;

uint count = MythVideoFrame::GetNumPlanes(Format);
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/devices/lirc_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ static void lirc_parse_string(const struct lirc_state *state, char *s,const char
*t=0;
}

static void lirc_parse_include(char *s,const char *name,int line)
static void lirc_parse_include(char *s,
[[maybe_unused]] const char *name,
[[maybe_unused]] int line)
{
(void)name;
(void)line;
size_t len=strlen(s);
if(len<2)
{
Expand Down
11 changes: 3 additions & 8 deletions mythtv/libs/libmythui/devices/mythinputdevicehandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ void MythInputDeviceHandler::Start(void)
#endif
}

void MythInputDeviceHandler::Stop(bool Finishing /* = true */)
void MythInputDeviceHandler::Stop([[maybe_unused]] bool Finishing /* = true */)
{
Q_UNUSED(Finishing) // depending on #ifdefs
LOG(VB_GENERAL, LOG_INFO, LOC + "Stopping");

#ifdef USING_LIBCEC
Expand Down Expand Up @@ -177,12 +176,10 @@ void MythInputDeviceHandler::Event(QEvent *Event) const
#endif
}

void MythInputDeviceHandler::Action(const QString &Action)
void MythInputDeviceHandler::Action([[maybe_unused]] const QString &Action)
{
#ifdef USING_LIBCEC
m_cecAdapter.Action(Action);
#else
(void) Action;
#endif
}

Expand All @@ -208,10 +205,8 @@ void MythInputDeviceHandler::MainWindowReady(void)
#endif
}

void MythInputDeviceHandler::customEvent(QEvent* Event)
void MythInputDeviceHandler::customEvent([[maybe_unused]] QEvent* Event)
{
Q_UNUSED(Event) // depending on #ifdefs

if (m_ignoreKeys)
return;

Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythui/mythdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
/*! \brief Create a MythDisplay object appropriate for the current platform.
* \note This function always returns a valid MythDisplay object.
*/
MythDisplay* MythDisplay::Create(MythMainWindow* MainWindow)
MythDisplay* MythDisplay::Create([[maybe_unused]] MythMainWindow* MainWindow)
{
MythDisplay* result = nullptr;
#ifdef USING_X11
Expand Down Expand Up @@ -111,8 +111,6 @@ MythDisplay* MythDisplay::Create(MythMainWindow* MainWindow)
}
#endif
}
#else
(void)MainWindow;
#endif
#ifdef USING_MMAL
if (!result)
Expand Down
5 changes: 2 additions & 3 deletions mythtv/libs/libmythui/mythhdr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ bool MythHDRMetadata::Equals(MythHDRMetadata* Other)
m_displayPrimaries[2][1] == Other->m_displayPrimaries[2][1];
}

MythHDRPtr MythHDR::Create(MythDisplay* MDisplay, const MythHDRDesc& Desc)
MythHDRPtr MythHDR::Create([[maybe_unused]] MythDisplay* MDisplay,
const MythHDRDesc& Desc)
{
MythHDRPtr result = nullptr;

Expand All @@ -35,8 +36,6 @@ MythHDRPtr MythHDR::Create(MythDisplay* MDisplay, const MythHDRDesc& Desc)
{
#if defined (USING_DRM) && defined (USING_QTPRIVATEHEADERS)
result = MythDRMHDR::Create(MDisplay, Desc);
#else
(void)MDisplay;
#endif
}

Expand Down
6 changes: 0 additions & 6 deletions mythtv/libs/libmythui/mythpainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,6 @@ void MythPainter::DrawEllipse(const QRect area, const QBrush &fillBrush,
}
}

void MythPainter::PushTransformation(const UIEffects &zoom, QPointF center)
{
(void)zoom;
(void)center;
}

void MythPainter::DrawTextPriv(MythImage *im, const QString &msg, int flags,
const QRect r, const MythFontProperties &font)
{
Expand Down
3 changes: 2 additions & 1 deletion mythtv/libs/libmythui/mythpainter.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ class MUI_PUBLIC MythPainter : public QObject
virtual void DrawEllipse(QRect area, const QBrush &fillBrush,
const QPen &linePen, int alpha);

virtual void PushTransformation(const UIEffects &zoom, QPointF center = QPointF());
virtual void PushTransformation([[maybe_unused]] const UIEffects &zoom,
[[maybe_unused]] QPointF center = QPointF()) {};
virtual void PopTransformation(void) { }

/// Returns a blank reference counted image in the format required
Expand Down
7 changes: 2 additions & 5 deletions mythtv/libs/libmythui/mythscreensaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
* use the MythMainWindow object here (or in any MythScreenSaver constructor) as
* it is not complete. Instead listen for the MythMainWindow::signalWindowReady signal.
*/
MythScreenSaverControl::MythScreenSaverControl(MythMainWindow* MainWin, MythDisplay* mDisplay)
MythScreenSaverControl::MythScreenSaverControl([[maybe_unused]] MythMainWindow* MainWin,
[[maybe_unused]] MythDisplay* mDisplay)
{
#if defined(USING_DBUS)
m_screenSavers.push_back(new MythScreenSaverDBus(this));
Expand All @@ -59,14 +60,10 @@ MythScreenSaverControl::MythScreenSaverControl(MythMainWindow* MainWin, MythDisp
MythScreenSaverDRM* drmsaver = MythScreenSaverDRM::Create(this, mDisplay);
if (drmsaver)
m_screenSavers.push_back(drmsaver);
#else
(void)mDisplay;
#endif
#ifdef USING_WAYLANDEXTRAS
if (QGuiApplication::platformName().toLower().contains("wayland"))
m_screenSavers.push_back(new MythScreenSaverWayland(this, MainWin));
#else
(void)MainWin;
#endif

for (auto * screensaver : m_screenSavers)
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythuiguidegrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,12 @@ QPoint MythUIGuideGrid::GetRowAndColumn(QPoint position)
return {-1,-1};
}

void MythUIGuideGrid::SetProgramInfo(int row, int col, const QRect area,
void MythUIGuideGrid::SetProgramInfo(int row,
[[maybe_unused]] int col, const QRect area,
const QString &title, const QString &genre,
int arrow, int recType, int recStat,
bool selected)
{
(void)col;
auto *data = new UIGTCon(area, title, genre, arrow, recType, recStat);
m_allData[row].append(data);

Expand Down
6 changes: 1 addition & 5 deletions mythtv/libs/libmythui/opengl/mythegl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,11 @@ bool MythEGL::InitEGL(void)
return true;

LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to resolve EGL functions");
#else
(void)m_context;
#endif
return false;
}

bool MythEGL::HasEGLExtension(QString Extension)
bool MythEGL::HasEGLExtension([[maybe_unused]] QString Extension)
{
#ifdef USING_EGL
OpenGLLocker locker(m_context);
Expand All @@ -71,8 +69,6 @@ bool MythEGL::HasEGLExtension(QString Extension)
QByteArray extensions = QByteArray(eglQueryString(m_eglDisplay, EGL_EXTENSIONS));
return extensions.contains(Extension.data()->toLatin1());
}
#else
(void)Extension;
#endif
return false;
}
Expand Down
10 changes: 4 additions & 6 deletions mythtv/libs/libmythui/platforms/drm/mythdrmframebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@
/*! \class MythDRMFramebuffer
* \brief A simple object representing a DRM Framebuffer object.
*/
DRMFb MythDRMFramebuffer::Create(int FD, uint32_t Id)
DRMFb MythDRMFramebuffer::Create([[maybe_unused]] int FD,
[[maybe_unused]] uint32_t Id)
{
/*
Currently disabled as drmModeGetFB2 is not available on older systems and
this functionality is not currently an absolute requirement
if (auto fb = std::shared_ptr<MythDRMFramebuffer>(new MythDRMFramebuffer(FD, Id)); fb.get() && fb->m_id)
return fb;
*/
(void)FD;
(void)Id;
return nullptr;
}

MythDRMFramebuffer::MythDRMFramebuffer(int FD, uint32_t Id)
MythDRMFramebuffer::MythDRMFramebuffer([[maybe_unused]] int FD,
[[maybe_unused]] uint32_t Id)
{
(void)FD;
(void)Id;
/*
if (auto fb = drmModeGetFB2(FD, Id); fb)
{
Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythui/platforms/mythdisplaydrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ bool MythDisplayDRM::DirectRenderingAvailable()
return false;
}

MythDisplayDRM::MythDisplayDRM(MythMainWindow* MainWindow)
MythDisplayDRM::MythDisplayDRM([[maybe_unused]] MythMainWindow* MainWindow)
{
m_device = MythDRMDevice::Create(m_screen);
Initialise();
#ifdef USING_QTPRIVATEHEADERS
if (MainWindow && m_device && m_device->GetVideoPlane())
connect(MainWindow, &MythMainWindow::SignalWindowReady, this, &MythDisplayDRM::MainWindowReady);
#else
(void)MainWindow;
#endif
}

Expand Down
5 changes: 2 additions & 3 deletions mythtv/libs/libmythui/platforms/mythdrmdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ void MythDRMDevice::SetupDRM(const MythCommandLineParser& CmdLine)
/*! \brief Create a MythDRMDevice instance.
* \returns A valid instance or nullptr on error.
*/
MythDRMPtr MythDRMDevice::Create(QScreen *qScreen, const QString &Device, bool NeedPlanes)
MythDRMPtr MythDRMDevice::Create(QScreen *qScreen, const QString &Device,
[[maybe_unused]] bool NeedPlanes)
{
#ifdef USING_QTPRIVATEHEADERS
auto * app = dynamic_cast<QGuiApplication *>(QCoreApplication::instance());
Expand Down Expand Up @@ -363,8 +364,6 @@ MythDRMPtr MythDRMDevice::Create(QScreen *qScreen, const QString &Device, bool N
#ifdef USING_QTPRIVATEHEADERS
if (auto result = std::shared_ptr<MythDRMDevice>(new MythDRMDevice(Device, NeedPlanes)); result && result->m_valid)
return result;
#else
(void)NeedPlanes;
#endif
return nullptr;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ void TestMythGenericTree::test_state(void)
QCOMPARE(QString("tres"), node.GetState("three"));
}

static QString test_cb_fn(const QString &name, void *data)
static QString test_cb_fn(const QString &name, [[maybe_unused]] void *data)
{
Q_UNUSED(data);
if (name == QStringLiteral("key2"))
return QStringLiteral("beta");
if (name == QStringLiteral("key3"))
Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythupnp/serializers/jsonSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ class UPNP_PUBLIC JSONSerializer : public Serializer

public:

JSONSerializer( QIODevice *pDevice, const QString &sRequestName )
: m_stream( pDevice ) { Q_UNUSED(sRequestName) }
JSONSerializer( QIODevice *pDevice,
[[maybe_unused]] const QString &sRequestName )
: m_stream( pDevice ) {};
virtual ~JSONSerializer() = default;

QString GetContentType() override; // Serializer
Expand Down
5 changes: 2 additions & 3 deletions mythtv/programs/mythbackend/mainserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7354,10 +7354,9 @@ void MainServer::HandleSetLogLevel(const QStringList &slist, PlaybackSock *pbs)
SendResponse(pbssock, retlist);
}

void MainServer::HandleIsRecording(const QStringList &slist, PlaybackSock *pbs)
void MainServer::HandleIsRecording([[maybe_unused]] const QStringList &slist,
PlaybackSock *pbs)
{
(void)slist;

MythSocket *pbssock = pbs->getSocket();
int RecordingsInProgress = 0;
int LiveTVRecordingsInProgress = 0;
Expand Down
6 changes: 2 additions & 4 deletions mythtv/programs/mythbackend/mainserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,8 @@ class MainServer : public QObject, public MythSocketCBs

void readyRead(MythSocket *socket) override; // MythSocketCBs
void connectionClosed(MythSocket *socket) override; // MythSocketCBs
void connectionFailed(MythSocket *socket) override // MythSocketCBs
{ (void)socket; }
void connected(MythSocket *socket) override // MythSocketCBs
{ (void)socket; }
void connectionFailed([[maybe_unused]] MythSocket *socket) override {}; // MythSocketCBs
void connected([[maybe_unused]] MythSocket *socket) override {}; // MythSocketCBs

void DeletePBS(PlaybackSock *sock);

Expand Down
5 changes: 2 additions & 3 deletions mythtv/programs/mythbackend/recordingextender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,10 +984,9 @@ RecExtMlbDataSource::loadPage(const ActiveGame& game, const QUrl& _url)
/// @param info A data structure describing the sport/league.
/// @param dt The date for which sporting events should be retrieved.
/// @returns a URL to extract the list of sporting events from the MLB API.
QUrl RecExtMlbDataSource::makeInfoUrl (const SportInfo& info, const QDateTime& dt)
QUrl RecExtMlbDataSource::makeInfoUrl ([[maybe_unused]] const SportInfo& info,
const QDateTime& dt)
{
Q_UNUSED(info);

if (!dt.isValid())
return {};

Expand Down
3 changes: 1 addition & 2 deletions mythtv/programs/mythbackend/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3304,11 +3304,10 @@ void Scheduler::HandleIdleShutdown(
}

//returns true, if the shutdown is not blocked
bool Scheduler::CheckShutdownServer(std::chrono::seconds prerollseconds,
bool Scheduler::CheckShutdownServer([[maybe_unused]] std::chrono::seconds prerollseconds,
QDateTime &idleSince,
bool &blockShutdown, uint logmask)
{
(void)prerollseconds;
bool retval = false;
QString preSDWUCheckCommand = gCoreContext->GetSetting("preSDWUCheckCommand",
"");
Expand Down
7 changes: 2 additions & 5 deletions mythtv/programs/mythbackend/services/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ bool Channel::UpdateDBChannel( uint MplexID,
uint ATSCMinorChannel,
bool UseEIT,
bool Visible,
const QString &ExtendedVisible,
[[maybe_unused]] const QString &ExtendedVisible,
const QString &FrequencyID,
const QString &Icon,
const QString &Format,
Expand Down Expand Up @@ -196,8 +196,6 @@ bool Channel::UpdateDBChannel( uint MplexID,
{
#ifndef _WIN32 // TODO Does not compile on Windows
channel.m_visible = channelVisibleTypeFromString(ExtendedVisible);
#else
Q_UNUSED(ExtendedVisible);
#endif
}
else if (HAS_PARAM("visible"))
Expand Down Expand Up @@ -250,7 +248,7 @@ bool Channel::AddDBChannel( uint MplexID,
uint ATSCMinorChannel,
bool UseEIT,
bool Visible,
const QString &ExtendedVisible,
[[maybe_unused]] const QString &ExtendedVisible,
const QString &FrequencyID,
const QString &Icon,
const QString &Format,
Expand All @@ -261,7 +259,6 @@ bool Channel::AddDBChannel( uint MplexID,
ChannelVisibleType chan_visible = kChannelVisible;

#ifdef _WIN32 // TODO Needs fixing for Windows
Q_UNUSED(ExtendedVisible);
chan_visible = (Visible ? kChannelVisible : kChannelNotVisible);
#else
if (HAS_PARAM("extendedvisible"))
Expand Down
4 changes: 1 addition & 3 deletions mythtv/programs/mythcommflag/BlankFrameDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,8 @@ BlankFrameDetector::computeForLogoSurplus(

int
BlankFrameDetector::computeForLogoDeficit(
const TemplateMatcher *templateMatcher)
[[maybe_unused]] const TemplateMatcher *templateMatcher)
{
(void)templateMatcher; /* gcc */

LOG(VB_COMMFLAG, LOG_INFO, "BlankFrameDetector adjusting for "
"too little logo coverage (unimplemented)");
return 0;
Expand Down
3 changes: 1 addition & 2 deletions mythtv/programs/mythcommflag/BorderDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ BorderDetector::BorderDetector(void)
}

int
BorderDetector::MythPlayerInited(const MythPlayer *player)
BorderDetector::MythPlayerInited([[maybe_unused]] const MythPlayer *player)
{
(void)player; /* gcc */
m_timeReported = false;
memset(&m_analyzeTime, 0, sizeof(m_analyzeTime));
return 0;
Expand Down
4 changes: 1 addition & 3 deletions mythtv/programs/mythcommflag/ClassicCommDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,8 @@ void ClassicCommDetector::GetCommercialBreakList(frm_dir_map_t &marks)
LOG(VB_COMMFLAG, LOG_INFO, "Final Commercial Break Map");
}

void ClassicCommDetector::recordingFinished(long long totalFileSize)
void ClassicCommDetector::recordingFinished([[maybe_unused]] long long totalFileSize)
{
(void)totalFileSize;

m_stillRecording = false;
}

Expand Down
3 changes: 1 addition & 2 deletions mythtv/programs/mythcommflag/CommDetectorBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class CommDetectorBase : public QObject
void resume();

virtual void GetCommercialBreakList(frm_dir_map_t &comms) = 0;
virtual void recordingFinished(long long totalFileSize)
{ (void)totalFileSize; };
virtual void recordingFinished([[maybe_unused]] long long totalFileSize) {};
virtual void requestCommBreakMapUpdate(void) {};

virtual void PrintFullMap(
Expand Down
15 changes: 7 additions & 8 deletions mythtv/programs/mythcommflag/EdgeDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ static int sort_ascending(const void *aa, const void *bb)

static int
edge_mark(AVFrame *dst, int dstheight,
int extratop, int extraright, int extrabottom, int extraleft,
int extratop, int extraright,
[[maybe_unused]] int extrabottom,
int extraleft,
const unsigned int *sgm, unsigned int *sgmsorted, int percentile,
int excluderow, int excludecol, int excludewidth, int excludeheight)
{
Expand All @@ -87,8 +89,6 @@ edge_mark(AVFrame *dst, int dstheight,
const int dstwidth = dst->linesize[0];
const int padded_width = extraleft + dstwidth + extraright;

(void)extrabottom; /* gcc */

/*
* sgm: SGM values of padded (convolved) image
*
Expand Down Expand Up @@ -196,12 +196,11 @@ int edge_mark_uniform_exclude(AVFrame *dst, int dstheight, int extramargin,
}; /* namespace */

int
EdgeDetector::setExcludeArea(int row, int col, int width, int height)
EdgeDetector::setExcludeArea([[maybe_unused]] int row,
[[maybe_unused]] int col,
[[maybe_unused]] int width,
[[maybe_unused]] int height)
{
(void)row; /* gcc */
(void)col; /* gcc */
(void)width; /* gcc */
(void)height; /* gcc */
return 0;
}

Expand Down
12 changes: 6 additions & 6 deletions mythtv/programs/mythcommflag/FrameAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class FrameAnalyzer
using FrameMap = QMap<long long, long long>;

virtual enum analyzeFrameResult MythPlayerInited(
MythPlayer *player, long long nframes) {
(void)player;
(void)nframes;
[[maybe_unused]] MythPlayer *player,
[[maybe_unused]] long long nframes)
{
return ANALYZE_OK;
};

Expand All @@ -60,9 +60,9 @@ class FrameAnalyzer
virtual enum analyzeFrameResult analyzeFrame(const MythVideoFrame *frame,
long long frameno, long long *pNextFrame /* [out] */) = 0;

virtual int finished(long long nframes, bool final) {
(void)nframes;
(void)final;
virtual int finished([[maybe_unused]] long long nframes,
[[maybe_unused]] bool final)
{
return 0;
}
virtual int reportTime(void) const { return 0; }
Expand Down
7 changes: 3 additions & 4 deletions mythtv/programs/mythcommflag/TemplateFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@ TemplateFinder::~TemplateFinder(void)
}

enum FrameAnalyzer::analyzeFrameResult
TemplateFinder::MythPlayerInited(MythPlayer *player, long long nframes)
TemplateFinder::MythPlayerInited(MythPlayer *player,
[[maybe_unused]] long long nframes)
{
/*
* Only detect edges in portions of the frame where we expect to find
Expand All @@ -781,7 +782,6 @@ TemplateFinder::MythPlayerInited(MythPlayer *player, long long nframes)
QString tmpldims;
QString playerdims;

(void)nframes; /* gcc */
QSize buf_dim = player->GetVideoBufferSize();
m_width = buf_dim.width();
m_height = buf_dim.height();
Expand Down Expand Up @@ -980,9 +980,8 @@ TemplateFinder::analyzeFrame(const MythVideoFrame *frame, long long frameno,
}

int
TemplateFinder::finished(long long nframes, bool final)
TemplateFinder::finished([[maybe_unused]] long long nframes, bool final)
{
(void)nframes; /* gcc */
if (!m_tmplDone)
{
if (!template_alloc(m_scores, m_width, m_height,
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythcommflag/pgm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ static int pgm_expand_uniform(AVFrame *dst, const AVFrame *src,
extramargin, extramargin, extramargin, extramargin);
}

int pgm_crop(AVFrame *dst, const AVFrame *src, int srcheight,
int pgm_crop(AVFrame *dst, const AVFrame *src,
[[maybe_unused]] int srcheight,
int srcrow, int srccol, int cropwidth, int cropheight)
{
const int srcwidth = src->linesize[0];
Expand All @@ -184,7 +185,6 @@ int pgm_crop(AVFrame *dst, const AVFrame *src, int srcheight,
cropwidth);
}

(void)srcheight; /* gcc */
return 0;
}

Expand Down
6 changes: 2 additions & 4 deletions mythtv/programs/mythfrontend/mythcontrols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,16 @@ void MythControls::ChangeButtonFocus(int direction)
/**
* \brief Slot handling a button being pressed in the left list
*/
void MythControls::LeftPressed(MythUIButtonListItem *item)
void MythControls::LeftPressed([[maybe_unused]] MythUIButtonListItem *item)
{
(void) item;
NextPrevWidgetFocus(true);
}

/**
* \brief Slot handling a button being pressed in the left list
*/
void MythControls::RightPressed(MythUIButtonListItem *item)
void MythControls::RightPressed([[maybe_unused]] MythUIButtonListItem *item)
{
(void) item;
if (m_currentView == kActionsByContext)
ChangeButtonFocus(0);
}
Expand Down
3 changes: 1 addition & 2 deletions mythtv/programs/mythfrontend/mythfrontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -892,9 +892,8 @@ static void handleGalleryMedia(MythMediaDevice *dev)
LOG(VB_MEDIA, LOG_INFO, "Main: Ignoring new gallery media - autorun not set");
}

static void TVMenuCallback(void *data, QString &selection)
static void TVMenuCallback([[maybe_unused]] void *data, QString &selection)
{
(void)data;
QString sel = selection.toLower();

if (sel.startsWith("settings ") || sel == "video_settings_general")
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/playbackboxlistitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ void PlaybackBoxListItem::SetToRealButton(
}
#else
PlaybackBoxListItem::PlaybackBoxListItem(
PlaybackBox *parent, MythUIButtonList *lbtype, ProgramInfo *pi) :
[[maybe_unused]] PlaybackBox *parent,
MythUIButtonList *lbtype, ProgramInfo *pi) :
MythUIButtonListItem(lbtype, "", QVariant::fromValue(pi))
{
(void) parent;
}
#endif
33 changes: 12 additions & 21 deletions mythtv/programs/mythfrontend/progfind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,22 +795,19 @@ void JaProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings &bindin
}


bool JaProgFinder::formatSelectedData(QString& data)
bool JaProgFinder::formatSelectedData([[maybe_unused]] QString& data)
{
(void)data;
return true;
}

bool JaProgFinder::formatSelectedData(QString& data, int charNum)
bool JaProgFinder::formatSelectedData([[maybe_unused]] QString& data,
[[maybe_unused]] int charNum)
{
(void)data;
(void)charNum;
return true;
}

void JaProgFinder::restoreSelectedData(QString& data)
void JaProgFinder::restoreSelectedData([[maybe_unused]] QString& data)
{
(void)data;
}

// Hebrew specific program finder
Expand Down Expand Up @@ -882,22 +879,19 @@ void HeProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings &bindin
bindings[":STARTTIME"] = progStart.addSecs(50 - progStart.time().second());
}

bool HeProgFinder::formatSelectedData(QString& data)
bool HeProgFinder::formatSelectedData([[maybe_unused]] QString& data)
{
(void)data;
return true;
}

bool HeProgFinder::formatSelectedData(QString& data, int charNum)
bool HeProgFinder::formatSelectedData([[maybe_unused]] QString& data,
[[maybe_unused]] int charNum)
{
(void)data;
(void)charNum;
return true;
}

void HeProgFinder::restoreSelectedData(QString& data)
void HeProgFinder::restoreSelectedData([[maybe_unused]] QString& data)
{
(void)data;
}

//////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1013,22 +1007,19 @@ void RuProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings
}
}

bool RuProgFinder::formatSelectedData(QString& data)
bool RuProgFinder::formatSelectedData([[maybe_unused]] QString& data)
{
(void)data;
return true;
}

bool RuProgFinder::formatSelectedData(QString& data, int charNum)
bool RuProgFinder::formatSelectedData([[maybe_unused]] QString& data,
[[maybe_unused]] int charNum)
{
(void)data;
(void)charNum;
return true;
}

void RuProgFinder::restoreSelectedData(QString& data)
void RuProgFinder::restoreSelectedData([[maybe_unused]] QString& data)
{
(void)data;
}

ProgramInfo *ProgFinder::GetCurrentProgram(void) const
Expand Down
6 changes: 2 additions & 4 deletions mythtv/programs/mythfrontend/themechooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,11 +581,9 @@ void ThemeChooser::showPopupMenu(void)
}
}

void ThemeChooser::popupClosed(const QString &which, int result)
void ThemeChooser::popupClosed([[maybe_unused]] const QString &which,
[[maybe_unused]] int result)
{
(void)which;
(void)result;

m_popupMenu = nullptr;
}

Expand Down
20 changes: 8 additions & 12 deletions mythtv/programs/mythfrontend/videodlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,9 @@ namespace
m_item->DisplayState(value, name);
}

void handleImage(const QString &name, const QString &filename) override // CopyMetadataDestination
void handleImage([[maybe_unused]] const QString &name,
[[maybe_unused]] const QString &filename) override // CopyMetadataDestination
{
(void) name;
(void) filename;
}

private:
Expand Down Expand Up @@ -3002,20 +3001,17 @@ namespace
{
explicit SimpleCollect(QStringList &fileList) : m_fileList(fileList) {}

DirectoryHandler *newDir(const QString &dirName,
const QString &fqDirName) override // DirectoryHandler
DirectoryHandler *newDir([[maybe_unused]] const QString &dirName,
[[maybe_unused]] const QString &fqDirName) override // DirectoryHandler
{
(void) dirName;
(void) fqDirName;
return this;
}

void handleFile(const QString &fileName, const QString &fqFileName,
const QString &extension, const QString &host) override // DirectoryHandler
void handleFile([[maybe_unused]] const QString &fileName,
const QString &fqFileName,
[[maybe_unused]] const QString &extension,
[[maybe_unused]] const QString &host) override // DirectoryHandler
{
(void) fileName;
(void) extension;
(void) host;
m_fileList.push_back(fqFileName);
}

Expand Down
3 changes: 1 addition & 2 deletions mythtv/programs/mythfrontend/videofileassoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,8 @@ bool FileAssocDialog::Create()
return true;
}

void FileAssocDialog::OnFASelected(MythUIButtonListItem *item)
void FileAssocDialog::OnFASelected([[maybe_unused]] MythUIButtonListItem *item)
{
(void) item;
UpdateScreen();
}

Expand Down
9 changes: 3 additions & 6 deletions mythtv/programs/mythfrontend/videolist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1154,9 +1154,8 @@ class dirhandler : public DirectoryHandler
}

DirectoryHandler *newDir(const QString &dir_name,
const QString &fq_dir_name) override // DirectoryHandler
[[maybe_unused]] const QString &fq_dir_name) override // DirectoryHandler
{
(void) fq_dir_name;
smart_dir_node dir = m_directory->addSubDir(dir_name);
DirectoryHandler *dh = new dirhandler(dir, m_prefix, m_metalist,
m_dhFreeList,
Expand All @@ -1172,13 +1171,11 @@ class dirhandler : public DirectoryHandler
handleFile(file_name, fq_file_name, extension, "");
}

void handleFile(const QString &file_name,
void handleFile([[maybe_unused]] const QString &file_name,
const QString &fq_file_name,
const QString &extension,
[[maybe_unused]] const QString &extension,
const QString &host) override // DirectoryHandler
{
(void) file_name;
(void) extension;
const QString& file_string(fq_file_name);

VideoMetadataListManager::VideoMetadataPtr myData(
Expand Down
9 changes: 3 additions & 6 deletions mythtv/programs/mythtranscode/mpeg2fix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ extern "C" {
#define O_LARGEFILE 0
#endif

static void *my_malloc(unsigned size, mpeg2_alloc_t reason)
static void *my_malloc(unsigned size, [[maybe_unused]] mpeg2_alloc_t reason)
{
(void)reason;

if (size)
{
char *buf = (char *) malloc (size + 63 + sizeof (void **));
Expand All @@ -65,10 +63,9 @@ static void *my_malloc(unsigned size, mpeg2_alloc_t reason)
return nullptr;
}

static void my_av_print(void *ptr, int level, const char* fmt, va_list vl)
static void my_av_print([[maybe_unused]] void *ptr,
int level, const char* fmt, va_list vl)
{
(void) ptr;

static QString s_fullLine("");

if (level > AV_LOG_INFO)
Expand Down
6 changes: 1 addition & 5 deletions mythtv/programs/mythtranscode/transcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static void TranscodeWriteText(void *ptr, unsigned char *buf, int len,

int Transcode::TranscodeFile(const QString &inputname,
const QString &outputname,
const QString &profileName,
[[maybe_unused]] const QString &profileName,
bool honorCutList, bool framecontrol,
int jobID, const QString& fifodir,
bool fifo_info, bool cleanCut,
Expand All @@ -211,10 +211,6 @@ int Transcode::TranscodeFile(const QString &inputname,
int hlsSegmentSize = 0;
int hlsSegmentFrames = 0;

#if !CONFIG_LIBMP3LAME
(void)profileName;
#endif

if (jobID >= 0)
JobQueue::ChangeJobComment(jobID, "0% " + QObject::tr("Completed"));

Expand Down