Permalink
Browse files

Fix some icc compiler warnings.

  • Loading branch information...
1 parent d6b4689 commit 3009980e5084be0dad65762710929797fd1c5837 @daniel-kristjansson daniel-kristjansson committed Jun 14, 2012
View
8 mythtv/libs/libmythtv/cardutil.cpp
@@ -1390,10 +1390,10 @@ int CardUtil::CreateCardInput(const uint cardid,
return -1;
}
- uint inputid = -1;
+ int inputid = -1; /* must be int not uint because of return type. */
if (query.next())
- inputid = query.value(0).toUInt();
+ inputid = query.value(0).toInt();
return inputid;
}
@@ -2199,10 +2199,10 @@ int CardUtil::CreateCaptureCard(const QString &videodevice,
return -1;
}
- uint cardid = -1;
+ int cardid = -1; /* must be int not uint because of return type. */
if (query.next())
- cardid = query.value(0).toUInt();
+ cardid = query.value(0).toInt();
return cardid;
}
View
4 mythtv/libs/libmythtv/dtvrecorder.cpp
@@ -1244,7 +1244,7 @@ bool DTVRecorder::ProcessTSPacket(const TSPacket &tspacket)
int v = _continuity_error_count.fetchAndAddRelaxed(1) + 1;
double erate = v * 100.0 / _packet_count.fetchAndAddRelaxed(0);
LOG(VB_RECORD, LOG_WARNING, LOC +
- QString("PID 0x%1 discontinuity detected ((%2+1)%16!=%3) %4\%")
+ QString("PID 0x%1 discontinuity detected ((%2+1)\%16!=%3) %4\%")
.arg(pid,0,16).arg(old_cnt,2)
.arg(tspacket.ContinuityCounter(),2)
.arg(erate));
@@ -1316,7 +1316,7 @@ bool DTVRecorder::ProcessAVTSPacket(const TSPacket &tspacket)
int v = _continuity_error_count.fetchAndAddRelaxed(1) + 1;
double erate = v * 100.0 / _packet_count.fetchAndAddRelaxed(0);
LOG(VB_RECORD, LOG_WARNING, LOC +
- QString("A/V PID 0x%1 discontinuity detected ((%2+1)%16!=%3) %4\%")
+ QString("A/V PID 0x%1 discontinuity detected ((%2+1)\%16!=%3) %4\%")
.arg(pid,0,16).arg(old_cnt).arg(tspacket.ContinuityCounter())
.arg(erate,5,'f',2));
}
View
4 mythtv/libs/libmythtv/sourceutil.cpp
@@ -469,10 +469,10 @@ int SourceUtil::CreateSource( QString sourcename,
return -1;
}
- uint sourceid = -1;
+ int sourceid = -1; /* must be int not uint because of return type. */
if (query.next())
- sourceid = query.value(0).toUInt();
+ sourceid = query.value(0).toInt();
return sourceid;
}

0 comments on commit 3009980

Please sign in to comment.