Silence ALL the compile warnings!

This commit is contained in:
Thulinma 2014-06-08 00:19:53 +02:00
parent c6e86a697b
commit b5745727a0
10 changed files with 22 additions and 24 deletions

View file

@ -20,7 +20,7 @@ namespace Mist {
return ntohl(((int*)(mapped + offset))[1]);
}
long long int getDTSCTime(char * mapped, long long int offset){
unsigned long long getDTSCTime(char * mapped, long long int offset){
char * timePoint = mapped + offset + 12;
return ((long long int)timePoint[0] << 56) | ((long long int)timePoint[1] << 48) | ((long long int)timePoint[2] << 40) | ((long long int)timePoint[3] << 32) | ((long long int)timePoint[4] << 24) | ((long long int)timePoint[5] << 16) | ((long long int)timePoint[6] << 8) | timePoint[7];
}
@ -106,8 +106,8 @@ namespace Mist {
tmp[6 * bufConnOffset + 4] = 0xFF;
tmp[6 * bufConnOffset + 5] = 0xFF;
playerConn.keepAlive();
int newTid = 0x80000000;
while (newTid == 0x80000000){
unsigned int newTid = 0x80000000u;
while (newTid == 0x80000000u){
Util::sleep(100);
newTid = ((long)(tmp[6 * bufConnOffset]) << 24) | ((long)(tmp[6 * bufConnOffset + 1]) << 16) | ((long)(tmp[6 * bufConnOffset + 2]) << 8) | tmp[6 * bufConnOffset + 3];
}
@ -202,7 +202,7 @@ namespace Mist {
bookKeeping[tNum].keyNum = 0;
bookKeeping[tNum].curOffset = 0;
}
if (bookKeeping[tNum].curOffset + tmp.size() < curPages[tNum].len){
if (bookKeeping[tNum].curOffset + tmp.size() < (unsigned long long)curPages[tNum].len){
bookKeeping[tNum].keyNum += (pack.isMember("keyframe") && pack["keyframe"]);
memcpy(curPages[tNum].mapped + bookKeeping[tNum].curOffset, tmp.data(), tmp.size());
bookKeeping[tNum].curOffset += tmp.size();
@ -424,7 +424,7 @@ namespace Mist {
stats();
nxtKeyNum[trackId] = pageNum;
if (currKeyOpen.count(trackId) && currKeyOpen[trackId] == pageNum){
if (currKeyOpen.count(trackId) && currKeyOpen[trackId] == (unsigned int)pageNum){
return;
}
char id[100];

View file

@ -199,7 +199,7 @@ namespace Mist {
if (!audioTrack){getTracks();}
unsigned int mstime = 0;
unsigned int mslen = 0;
if (fragNum < myMeta.tracks[tid].missedFrags){
if (fragNum < (unsigned int)myMeta.tracks[tid].missedFrags){
HTTP_S.Clean();
HTTP_S.SetBody("The requested fragment is no longer kept in memory on the server and cannot be served.\n");
HTTP_S.SendResponse("412", "Fragment out of range", myConn);

View file

@ -102,12 +102,12 @@ namespace Mist {
for (std::set<unsigned long>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++) {
//return "too late" if one track is past this point
if (ms < myMeta.tracks[*it].firstms) {
DEBUG_MSG(DLVL_DEVEL, "HSS Canseek to %d returns -1 because track %lu firstms == %d", ms, *it, myMeta.tracks[*it].firstms);
DEBUG_MSG(DLVL_DEVEL, "HSS Canseek to %d returns -1 because track %lu firstms == %llu", ms, *it, myMeta.tracks[*it].firstms);
return -1;
}
//return "too early" if one track is not yet at this point
if (ms > myMeta.tracks[*it].lastms) {
DEBUG_MSG(DLVL_DEVEL, "HSS Canseek to %d returns 1 because track %lu lastms == %d", ms, *it, myMeta.tracks[*it].lastms);
DEBUG_MSG(DLVL_DEVEL, "HSS Canseek to %d returns 1 because track %lu lastms == %llu", ms, *it, myMeta.tracks[*it].lastms);
return 1;
}
}
@ -171,12 +171,10 @@ namespace Mist {
std::stringstream sstream;
int partOffset = 0;
int keyDur = 0;
DTSC::Key keyObj;
for (std::deque<DTSC::Key>::iterator it = myMeta.tracks[tid].keys.begin(); it != myMeta.tracks[tid].keys.end(); it++) {
if (it->getTime() >= seekTime) {
keyObj = (*it);
keyDur = it->getLength();
std::deque<DTSC::Key>::iterator nextIt = it;
nextIt++;
if (nextIt == myMeta.tracks[tid].keys.end()) {

View file

@ -22,7 +22,7 @@ namespace Mist {
int keysToSend;
int myTrackStor;
int myKeyStor;
long long int playUntil;
unsigned long long playUntil;
};
}

View file

@ -43,10 +43,10 @@ namespace Mist {
long long int firstms = -1;
long long int lastms = -1;
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++) {
if (lastms == -1 || lastms < myMeta.tracks[*it].lastms){
if (lastms == -1 || lastms < (long long)myMeta.tracks[*it].lastms){
lastms = myMeta.tracks[*it].lastms;
}
if (firstms == -1 || firstms > myMeta.tracks[*it].firstms){
if (firstms == -1 || firstms > (long long)myMeta.tracks[*it].firstms){
firstms = myMeta.tracks[*it].firstms;
}
}
@ -438,7 +438,7 @@ namespace Mist {
char * dataPointer = 0;
unsigned int len = 0;
currentPacket.getString("data", dataPointer, len);
if (currentPacket.getTrackId() != sortSet.begin()->trackID || currentPacket.getTime() != sortSet.begin()->time){
if ((unsigned long)currentPacket.getTrackId() != sortSet.begin()->trackID || currentPacket.getTime() != sortSet.begin()->time){
if (perfect){
DEBUG_MSG(DLVL_WARN, "Warning: input is inconsistent, playback may not be perfect");
perfect = false;

View file

@ -42,11 +42,11 @@ namespace Mist {
}
long long unsigned int time = currentPacket.getTime();
char tmpBuf[50];
int tmpLen = sprintf(tmpBuf, "%0.2llu:%0.2llu:%0.2llu,%0.3llu", (time / 3600000), ((time % 3600000) / 60000), (((time % 3600000) % 60000) / 1000), time % 1000);
int tmpLen = sprintf(tmpBuf, "%.2llu:%.2llu:%.2llu,%.3llu", (time / 3600000), ((time % 3600000) / 60000), (((time % 3600000) % 60000) / 1000), time % 1000);
tmp.write(tmpBuf, tmpLen);
tmp << " --> ";
time += currentPacket.getInt("duration");
tmpLen = sprintf(tmpBuf, "%0.2llu:%0.2llu:%0.2llu,%0.3llu", (time / 3600000), ((time % 3600000) / 60000), (((time % 3600000) % 60000) / 1000), time % 1000);
tmpLen = sprintf(tmpBuf, "%.2llu:%.2llu:%.2llu,%.3llu", (time / 3600000), ((time % 3600000) / 60000), (((time % 3600000) % 60000) / 1000), time % 1000);
tmp.write(tmpBuf, tmpLen);
tmp << std::endl;
myConn.SendNow(tmp.str());