Ticket #12996: v2-0005-Use-parameters-that-were-flagged-as-unused-parame.patch

File v2-0005-Use-parameters-that-were-flagged-as-unused-parame.patch, 3.8 KB (added by David Hampton <mythtv@…>, 3 years ago)

Find way to use an 'unused parameter'.

  • mythtv/libs/libmyth/audio/audioconvert.h

    Use parameters that were flagged as 'unused parameter'
    warnings.
    
    Modifies the code to use 'unused parameters' by 1) fixing a bug, 2)
    enhancing program output, 3) setting them on the object, or 4) passing
    them along to other functions.
    ---
     mythtv/libs/libmyth/audio/audioconvert.h         | 2 +-
     mythtv/libs/libmyth/mythterminal.cpp             | 6 +++++-
     mythtv/libs/libmythtv/playercontext.cpp          | 2 +-
     mythtv/libs/libmythtv/tv_play.cpp                | 3 +++
     mythtv/libs/libmythui/mythnotificationcenter.cpp | 5 ++++-
     5 files changed, 14 insertions(+), 4 deletions(-)
    
    diff --git a/mythtv/libs/libmyth/audio/audioconvert.h b/mythtv/libs/libmyth/audio/audioconvert.h
    index b9be02f..3a2c205 100644
    a b public: 
    5151    bool operator==(AudioConvert& rhs) const
    5252    { return m_in == rhs.m_in && m_out == rhs.m_out; }
    5353    bool operator!=(AudioConvert& rhs) const
    54     { return m_in != m_out; }
     54    { return m_in != rhs.m_in || m_out != rhs.m_out; }
    5555
    5656    void DeinterleaveSamples(int channels,
    5757                             uint8_t* output, const uint8_t* input,
  • mythtv/libs/libmyth/mythterminal.cpp

    diff --git a/mythtv/libs/libmyth/mythterminal.cpp b/mythtv/libs/libmyth/mythterminal.cpp
    index c784918..684af48 100644
    a b void MythTerminal::ProcessFinished( 
    155155    int exitCode, QProcess::ExitStatus exitStatus)
    156156{
    157157    QMutexLocker locker(&lock);
    158     AddText(tr("*** Exited with status: %1 ***").arg(exitCode));
     158    if (exitStatus == QProcess::CrashExit) {
     159        AddText(tr("*** Crashed with status: %1 ***").arg(exitCode));
     160    } else {
     161        AddText(tr("*** Exited with status: %1 ***").arg(exitCode));
     162    }
    159163    setEnabled(false);
    160164    running = false;
    161165}
  • mythtv/libs/libmythtv/playercontext.cpp

    diff --git a/mythtv/libs/libmythtv/playercontext.cpp b/mythtv/libs/libmythtv/playercontext.cpp
    index 40c2bb2..d80cec9 100644
    a b bool PlayerContext::CalcPlayerSliderPosition(osdInfo &info, 
    360360    QMutexLocker locker(&deletePlayerLock);
    361361    if (player)
    362362    {
    363         player->calcSliderPos(info);
     363        player->calcSliderPos(info, paddedFields);
    364364        return true;
    365365    }
    366366    return false;
  • mythtv/libs/libmythtv/tv_play.cpp

    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index 17ee1e2..ee7a50d 100644
    a b bool MenuBase::LoadStringHelper(const QString &text, 
    1117111171                                int includeLevel)
    1117211172{
    1117311173    bool result = false;
     11174
     11175    m_translationContext = translationContext;
     11176    m_keyBindingContext = keyBindingContext;
    1117411177    m_document = new QDomDocument();
    1117511178    if (m_document->setContent(text))
    1117611179    {
  • mythtv/libs/libmythui/mythnotificationcenter.cpp

    diff --git a/mythtv/libs/libmythui/mythnotificationcenter.cpp b/mythtv/libs/libmythui/mythnotificationcenter.cpp
    index 7a0874e..fc9a387 100644
    a b void ShowNotificationError(const QString &msg, 
    14851485                           const VNMask visibility,
    14861486                           const MythNotification::Priority priority)
    14871487{
    1488     ShowNotification(true, msg, from, detail);
     1488    ShowNotification(true, msg, from, detail,
     1489                     QString(), QString(), QString(), -1, -1, false,
     1490                     visibility, priority);
    14891491}
    14901492
    14911493void ShowNotification(const QString &msg,
    void ShowNotification(MythNotification::Type type, 
    15851587    n->SetFullScreen(fullscreen);
    15861588    n->SetPriority(priority);
    15871589    n->SetVisibility(visibility);
     1590    n->SetStyle(style);
    15881591
    15891592    MythNotificationCenter::GetInstance()->Queue(*n);
    15901593    delete n;