Fix comparison between signed and unsigned integers

Warning was seen when compiling with -Wall.
This commit is contained in:
Antony Cherepanov 2016-11-08 17:06:53 +03:00 committed by Henrik Grimler
parent 1385b183d2
commit c939ab18d1
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 2 additions and 2 deletions

View File

@ -749,7 +749,7 @@ bool BridgeManager::ReceivePacket(InboundPacket *packet, int timeout, int emptyT
if (receivedSize < 0)
return (false);
if (receivedSize != packet->GetSize() && !packet->IsSizeVariable())
if (static_cast<unsigned int>(receivedSize) != packet->GetSize() && !packet->IsSizeVariable())
{
if (verbose)
Interface::PrintError("Incorrect packet size received - expected size = %d, received size = %d.\n", packet->GetSize(), receivedSize);

View File

@ -148,7 +148,7 @@ int DownloadPitAction::Execute(int argc, char **argv)
if (fileSize > 0)
{
if (fwrite(pitBuffer, 1, fileSize, outputPitFile) != fileSize)
if (fwrite(pitBuffer, 1, fileSize, outputPitFile) != static_cast<size_t>(fileSize))
{
Interface::PrintError("Failed to write PIT data to output file.\n");
success = false;