Silence more compile warnings, fix compilation on MacOS

This commit is contained in:
Thulinma 2022-10-26 16:13:27 +02:00
parent 0a13ec1119
commit 4181b52857
34 changed files with 61 additions and 73 deletions

View file

@ -1752,7 +1752,7 @@ namespace Mist{
JSON::Value & pData = pStat["push_status_update"]["status"];
pData["mediatime"] = currentTime();
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
pData["tracks"].append(it->first);
pData["tracks"].append((uint64_t)it->first);
}
pData["bytes"] = statComm.getUp();
uint64_t pktCntNow = statComm.getPacketCount();

View file

@ -274,8 +274,8 @@ namespace Mist{
timingTid,
requestTid,
M.biggestFragment(timingTid) / 1000,
atol(H.GetVar("iMsn").c_str()),
M.getLive()? config->getInteger("listlimit") : 0,
(uint64_t)atol(H.GetVar("iMsn").c_str()),
(uint64_t)(M.getLive() ? config->getInteger("listlimit") : 0),
urlPrefix,
systemBoot,
bootMsOffset,

View file

@ -209,7 +209,7 @@ namespace Mist{
if (kDur > longest_key){longest_key = kDur;}
}
if (dur > longest_key*1.2){
onFail("Key duration mismatch; disconnecting "+myConn.getHost()+" to recover ("+JSON::Value(longest_key).asString()+" -> "+JSON::Value(dur).asString()+")", true);
onFail("Key duration mismatch; disconnecting "+myConn.getHost()+" to recover ("+JSON::Value(longest_key).asString()+" -> "+JSON::Value((uint64_t)dur).asString()+")", true);
return;
}else{
sendOk("Key duration matches upstream");

View file

@ -195,7 +195,7 @@ namespace Mist{
continue;
}
r["data"]["codecs"].append(codec);
r["data"]["tracks"].append(it->first);
r["data"]["tracks"].append((uint64_t)it->first);
++it;
}
webSock->sendFrame(r.toString());
@ -305,7 +305,7 @@ namespace Mist{
}
}
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
r["data"]["tracks"].append(it->first);
r["data"]["tracks"].append((uint64_t)it->first);
}
webSock->sendFrame(r.toString());
}
@ -448,7 +448,7 @@ namespace Mist{
r["type"] = "info";
r["data"]["msg"] = "Sending header";
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
r["data"]["tracks"].append(it->first);
r["data"]["tracks"].append((uint64_t)it->first);
}
webSock->sendFrame(r.toString());

View file

@ -161,8 +161,8 @@ namespace Mist{
timingTid,
requestTid,
M.biggestFragment(timingTid) / 1000,
atol(H.GetVar("iMsn").c_str()),
M.getLive()? config->getInteger("listlimit") : 0,
(uint64_t)atol(H.GetVar("iMsn").c_str()),
(uint64_t)(M.getLive() ? config->getInteger("listlimit") : 0),
urlPrefix,
systemBoot,
bootMsOffset,

View file

@ -773,7 +773,7 @@ namespace Mist{
std::set<size_t> validTracks = M.getValidTracks();
for (std::set<size_t>::iterator it = validTracks.begin(); it != validTracks.end(); it++){
if (M.getType(*it) == "video"){
trackSources += " <video src='" + streamName + "?track=" + JSON::Value(*it).asString() +
trackSources += " <video src='" + streamName + "?track=" + JSON::Value((uint64_t)*it).asString() +
"' height='" + JSON::Value(M.getHeight(*it)).asString() +
"' system-bitrate='" + JSON::Value(M.getBps(*it)).asString() +
"' width='" + JSON::Value(M.getWidth(*it)).asString() + "' />\n";

View file

@ -46,7 +46,7 @@ namespace Mist{
thisPacket.getString("data", dPtr, dLen);
jPack["data"] = JSON::fromString(dPtr, dLen);
jPack["time"] = thisPacket.getTime();
jPack["track"] = thisIdx;
jPack["track"] = (uint64_t)thisIdx;
}else{
jPack = thisPacket.toJSON();
}

View file

@ -1403,7 +1403,7 @@ namespace Mist{
r["type"] = "info";
r["data"]["msg"] = "Sending header";
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
r["data"]["tracks"].append(it->first);
r["data"]["tracks"].append((uint64_t)it->first);
}
webSock->sendFrame(r.toString());
@ -1620,7 +1620,7 @@ namespace Mist{
continue;
}
r["data"]["codecs"].append(codec);
r["data"]["tracks"].append(it->first);
r["data"]["tracks"].append((uint64_t)it->first);
++it;
}
webSock->sendFrame(r.toString());
@ -1731,7 +1731,7 @@ namespace Mist{
}
uint64_t jitter = 0;
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
r["data"]["tracks"].append(it->first);
r["data"]["tracks"].append((uint64_t)it->first);
if (jitter < M.getMinKeepAway(it->first)){jitter = M.getMinKeepAway(it->first);}
}
r["data"]["jitter"] = jitter;

View file

@ -46,7 +46,7 @@ namespace Mist{
pp[param]["name"] = name;
pp[param]["help"] = help;
pp[param]["type"] = "int";
pp[param]["default"] = def;
pp[param]["default"] = (uint64_t)def;
}
static void addStrOpt(JSON::Value & pp, const std::string & param, const std::string & name, const std::string & help, const std::string & def = ""){

View file

@ -131,7 +131,7 @@ namespace Mist{
pp[param]["name"] = name;
pp[param]["help"] = help;
pp[param]["type"] = "int";
pp[param]["default"] = def;
pp[param]["default"] = (uint64_t)def;
}
static void addStrOpt(JSON::Value & pp, const std::string & param, const std::string & name, const std::string & help, const std::string & def = ""){

View file

@ -552,7 +552,7 @@ namespace Mist{
commandResult["begin"] = startTime();
commandResult["end"] = endTime();
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
commandResult["tracks"].append(it->first);
commandResult["tracks"].append((uint64_t)it->first);
}
webSock->sendFrame(commandResult.toString());
return;
@ -567,7 +567,7 @@ namespace Mist{
commandResult["begin"] = startTime();
commandResult["end"] = endTime();
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
commandResult["tracks"].append(it->first);
commandResult["tracks"].append((uint64_t)it->first);
}
webSock->sendFrame(commandResult.toString());
return;
@ -710,7 +710,7 @@ namespace Mist{
commandResult["begin"] = startTime();
commandResult["end"] = endTime();
for (std::map<size_t, Comms::Users>::iterator it = userSelect.begin(); it != userSelect.end(); it++){
commandResult["tracks"].append(it->first);
commandResult["tracks"].append((uint64_t)it->first);
}
webSock->sendFrame(commandResult.toString());
}else if (isPushing()){