Skip to content

Commit

Permalink
cppcheck: Fix local variables shadowing outer variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Apr 4, 2019
1 parent f293620 commit 5b6dd66
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions mythtv/libs/libmyth/audio/audiooutput.cpp
Expand Up @@ -529,10 +529,10 @@ AudioOutput::ADCVect* AudioOutput::GetOutputList(void)
for (QMap<int, QString>::const_iterator i = dxdevs->begin();
i != dxdevs->end(); ++i)
{
QString desc = i.value();
QString devname = QString("DirectX:%1").arg(desc);
QString devdesc = i.value();
QString devname = QString("DirectX:%1").arg(devdesc);

adc = GetAudioDeviceConfig(devname, desc);
adc = GetAudioDeviceConfig(devname, devdesc);
if (!adc)
continue;
list->append(*adc);
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/cardutil.cpp
Expand Up @@ -2030,9 +2030,9 @@ bool CardUtil::GetV4LInfo(
#ifdef USING_V4L1
else // Fallback to V4L1 query
{
struct video_capability capability;
if (ioctl(videofd, VIDIOCGCAP, &capability) >= 0)
input = QString::fromLatin1((const char*)capability.name);
struct video_capability capability2;
if (ioctl(videofd, VIDIOCGCAP, &capability2) >= 0)
input = QString::fromLatin1((const char*)capability2.name);
}
#endif // USING_V4L1
#endif // USING_V4L2
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/privatedecoder_vda.cpp
Expand Up @@ -749,8 +749,8 @@ void PrivateDecoderVDA::VDADecoderCallback(void *decompressionOutputRefCon,
int i = 0;
for (; i < decoder->m_decoded_frames.size(); i++)
{
int64_t pts = decoder->m_decoded_frames[i].pts;
if (pts != (int64_t)AV_NOPTS_VALUE && time > pts)
int64_t pts2 = decoder->m_decoded_frames[i].pts;
if (pts2 != (int64_t)AV_NOPTS_VALUE && time > pts2)
{
found = true;
break;
Expand Down
8 changes: 4 additions & 4 deletions mythtv/programs/mythbackend/services/channelicon.cpp
Expand Up @@ -51,8 +51,8 @@ DTC::ChannelIconList* ChannelIcon::LookupChannelIcon ( const QString &Query,

// query http://services.mythtv.org/channel-icon/lookup
QByteArray data;
QString url = QString("http://services.mythtv.org/channel-icon/lookup?%1=%2").arg(FieldName).arg(Query);
if (!GetMythDownloadManager()->download(url, &data))
QString lookupUrl = QString("http://services.mythtv.org/channel-icon/lookup?%1=%2").arg(FieldName).arg(Query);
if (!GetMythDownloadManager()->download(lookupUrl, &data))
{
//throw( QString("Download from services.mythtv.org failed."));
return pChannelIcons;
Expand Down Expand Up @@ -97,8 +97,8 @@ DTC::ChannelIconList* ChannelIcon::SearchChannelIcon ( const QString &Query )

// query http://services.mythtv.org/channel-icon/search
QByteArray data;
QString url = QString("http://services.mythtv.org/channel-icon/search?s=%1").arg(Query);
if (!GetMythDownloadManager()->download(url, &data))
QString searchUrl = QString("http://services.mythtv.org/channel-icon/search?s=%1").arg(Query);
if (!GetMythDownloadManager()->download(searchUrl, &data))
return pChannelIcons;

// ----------------------------------------------------------------------
Expand Down

0 comments on commit 5b6dd66

Please sign in to comment.