Unused parameter fixes for conditionally used variable.
Fix unused parameter warnings when the variable is referenced inside
of conditionally compiled blocks. In this case the variable can't be
removed from the function arguments so the Q_UNUSED macro is used
inside of an '#else' block or another conditional block is added
containing the Q_UNUSED macros.
---
mythtv/libs/libmythbase/loggingserver.cpp | 2 ++
mythtv/libs/libmythtv/cardutil.cpp | 3 ++-
mythtv/libs/libmythtv/playercontext.cpp | 12 ++++++++++++
mythtv/libs/libmythtv/privatedecoder.cpp | 10 ++++++++++
mythtv/libs/libmythtv/videosource.cpp | 1 +
mythtv/libs/libmythupnp/xsd.cpp | 2 ++
6 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/mythtv/libs/libmythbase/loggingserver.cpp b/mythtv/libs/libmythbase/loggingserver.cpp
index 08e6888..18b52ee 100644
a
|
b
|
void LogServerThread::pingClient(QString clientId) |
942 | 942 | QByteArray clientBa = QByteArray::fromHex(clientId.toLocal8Bit()); |
943 | 943 | msg << clientBa << QByteArray(""); |
944 | 944 | m_zmqInSock->sendMessage(msg); |
| 945 | #else |
| 946 | Q_UNUSED(clientId) |
945 | 947 | #endif |
946 | 948 | } |
947 | 949 | |
diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp
index 56dfd07..5b5683dd 100644
a
|
b
|
bool CardUtil::SetASIMode(uint device_num, uint mode, QString *error) |
2407 | 2407 | } |
2408 | 2408 | return ok; |
2409 | 2409 | #else |
2410 | | (void) device_num; |
| 2410 | Q_UNUSED(device_num); |
| 2411 | Q_UNUSED(mode); |
2411 | 2412 | if (error) |
2412 | 2413 | *error = "Not compiled with ASI support."; |
2413 | 2414 | return false; |
diff --git a/mythtv/libs/libmythtv/playercontext.cpp b/mythtv/libs/libmythtv/playercontext.cpp
index 593a1dc..40c2bb2 100644
a
|
b
|
void PlayerContext::LockPlayingInfo(const char *file, int line) const |
585 | 585 | #if 0 |
586 | 586 | LOG(VB_GENERAL, LOG_DEBUG, QString("LockPlayingInfo(%1,%2)") |
587 | 587 | .arg(file).arg(line)); |
| 588 | #else |
| 589 | Q_UNUSED(file); |
| 590 | Q_UNUSED(line); |
588 | 591 | #endif |
589 | 592 | playingInfoLock.lock(); |
590 | 593 | } |
… |
… |
void PlayerContext::UnlockPlayingInfo(const char *file, int line) const |
594 | 597 | #if 0 |
595 | 598 | LOG(VB_GENERAL, LOG_DEBUG, QString("UnlockPlayingInfo(%1,%2)") |
596 | 599 | .arg(file).arg(line)); |
| 600 | #else |
| 601 | Q_UNUSED(file); |
| 602 | Q_UNUSED(line); |
597 | 603 | #endif |
598 | 604 | playingInfoLock.unlock(); |
599 | 605 | } |
… |
… |
void PlayerContext::LockDeletePlayer(const char *file, int line) const |
608 | 614 | #if 0 |
609 | 615 | LOG(VB_GENERAL, LOG_DEBUG, QString("LockDeletePlayer(%1,%2)") |
610 | 616 | .arg(file).arg(line)); |
| 617 | #else |
| 618 | Q_UNUSED(file); |
| 619 | Q_UNUSED(line); |
611 | 620 | #endif |
612 | 621 | deletePlayerLock.lock(); |
613 | 622 | } |
… |
… |
void PlayerContext::UnlockDeletePlayer(const char *file, int line) const |
620 | 629 | #if 0 |
621 | 630 | LOG(VB_GENERAL, LOG_DEBUG, QString("UnlockDeletePlayer(%1,%2)") |
622 | 631 | .arg(file).arg(line)); |
| 632 | #else |
| 633 | Q_UNUSED(file); |
| 634 | Q_UNUSED(line); |
623 | 635 | #endif |
624 | 636 | deletePlayerLock.unlock(); |
625 | 637 | } |
diff --git a/mythtv/libs/libmythtv/privatedecoder.cpp b/mythtv/libs/libmythtv/privatedecoder.cpp
index 5042599..a6ced57 100644
a
|
b
|
void PrivateDecoder::GetDecoders(render_opts &opts) |
25 | 25 | #ifdef USING_CRYSTALHD |
26 | 26 | PrivateDecoderCrystalHD::GetDecoders(opts); |
27 | 27 | #endif |
| 28 | |
| 29 | #if !(defined(Q_OS_MACX) || USING_OPENMAX || USING_CRYSTALHD) |
| 30 | Q_UNUSED(opts); |
| 31 | #endif |
28 | 32 | } |
29 | 33 | |
30 | 34 | PrivateDecoder* PrivateDecoder::Create(const QString &decoder, |
… |
… |
PrivateDecoder* PrivateDecoder::Create(const QString &decoder, |
52 | 56 | delete chd; |
53 | 57 | #endif |
54 | 58 | |
| 59 | #if !(defined(Q_OS_MACX) || USING_OPENMAX || USING_CRYSTALHD) |
| 60 | Q_UNUSED(decoder); |
| 61 | Q_UNUSED(flags); |
| 62 | Q_UNUSED(avctx); |
| 63 | #endif |
| 64 | |
55 | 65 | return NULL; |
56 | 66 | } |
diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp
index 31c7339..74e249b 100644
a
|
b
|
void ASIConfigurationGroup::probeCard(const QString &device) |
1978 | 1978 | } |
1979 | 1979 | cardinfo->setValue(tr("Valid DVEO ASI card")); |
1980 | 1980 | #else |
| 1981 | Q_UNUSED(device); |
1981 | 1982 | cardinfo->setValue(QString("Not compiled with ASI support")); |
1982 | 1983 | #endif |
1983 | 1984 | } |
diff --git a/mythtv/libs/libmythupnp/xsd.cpp b/mythtv/libs/libmythupnp/xsd.cpp
index 7c6e942..231e74c 100755
a
|
b
|
bool Xsd::IsEnum( const QMetaProperty &metaProperty, const QString &sType ) |
562 | 562 | return true; |
563 | 563 | } |
564 | 564 | |
| 565 | #else |
| 566 | Q_UNUSED(sType); |
565 | 567 | #endif |
566 | 568 | |
567 | 569 | return false; |