From 05d4c747a97124dbf92af9f718fefe475074ce41 Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Sun, 6 Mar 2016 13:45:37 +0100 Subject: - fixed compiler warning: dead initialization (the values are never read) In order to not get compiler warnings about 'unused return values' a void cast is used, which also makes it clear the the returned values are ignored on purpose --- heimdall/source/SendFilePartPacket.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'heimdall/source/SendFilePartPacket.h') diff --git a/heimdall/source/SendFilePartPacket.h b/heimdall/source/SendFilePartPacket.h index 38e9dbe..561bf58 100644 --- a/heimdall/source/SendFilePartPacket.h +++ b/heimdall/source/SendFilePartPacket.h @@ -46,9 +46,7 @@ namespace Heimdall // min(fileSize, size) unsigned int bytesToRead = (fileSize < size) ? fileSize - position : size; - - // bytesRead is discarded (it's just there to stop GCC warnings) - unsigned int bytesRead = fread(data, 1, bytesToRead, file); + (void)fread(data, 1, bytesToRead, file); } SendFilePartPacket(unsigned char *buffer, unsigned int size) : OutboundPacket(size) -- cgit v1.1