~grimler/Heimdall

c939ab18d175718a37222ecb626f17372a097019 — Antony Cherepanov 7 years ago 1385b18
Fix comparison between signed and unsigned integers

Warning was seen when compiling with -Wall.
2 files changed, 2 insertions(+), 2 deletions(-)

M heimdall/source/BridgeManager.cpp
M heimdall/source/DownloadPitAction.cpp
M heimdall/source/BridgeManager.cpp => heimdall/source/BridgeManager.cpp +1 -1
@@ 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);

M heimdall/source/DownloadPitAction.cpp => heimdall/source/DownloadPitAction.cpp +1 -1
@@ 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;