Skip to content

Commit

Permalink
cppcheck: remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dekarl committed Jul 19, 2013
1 parent c0c1aa9 commit 472cb6a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mythtv/programs/mythtranscode/main.cpp
Expand Up @@ -905,7 +905,6 @@ static void CompleteJob(int jobID, ProgramInfo *pginfo, bool useCutlist,

if (!gCoreContext->GetNumSetting("SaveTranscoding", 0))
{
int err;
bool followLinks =
gCoreContext->GetNumSetting("DeletesFollowLinks", 0);

Expand All @@ -918,9 +917,7 @@ static void CompleteJob(int jobID, ProgramInfo *pginfo, bool useCutlist,
{
QString link = getSymlinkTarget(oldfile);
QByteArray alink = link.toLocal8Bit();
err = transUnlink(alink.constData(), pginfo);

if (err)
if (transUnlink(alink.constData(), pginfo))
{
LOG(VB_GENERAL, LOG_ERR,
QString("mythtranscode: Error deleting '%1' "
Expand All @@ -929,8 +926,7 @@ static void CompleteJob(int jobID, ProgramInfo *pginfo, bool useCutlist,
.arg(aoldfile.constData()) + ENO);
}

err = unlink(aoldfile.constData());
if (err)
if (unlink(aoldfile.constData()))
{
LOG(VB_GENERAL, LOG_ERR,
QString("mythtranscode: Error deleting '%1', "
Expand All @@ -941,7 +937,7 @@ static void CompleteJob(int jobID, ProgramInfo *pginfo, bool useCutlist,
}
else
{
if ((err = transUnlink(aoldfile.constData(), pginfo)))
if (transUnlink(aoldfile.constData(), pginfo))
LOG(VB_GENERAL, LOG_ERR,
QString("mythtranscode: Error deleting '%1': ")
.arg(oldfile) + ENO);
Expand Down

0 comments on commit 472cb6a

Please sign in to comment.