Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86b7be83 authored by Benjamin Dobell's avatar Benjamin Dobell
Browse files

Merge pull request #332 from kratz00/unused_variables

- fixed compiler warning: dead initialization (the values are never read)
parents 2bab8d94 05d4c747
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ int PrintPitAction::Execute(int argc, char **argv)

		// Load the local pit file into memory.
		unsigned char *pitFileBuffer = new unsigned char[localPitFileSize];
		size_t dataRead = fread(pitFileBuffer, 1, localPitFileSize, localPitFile); // dataRead is discarded, it's here to remove warnings.
		(void)fread(pitFileBuffer, 1, localPitFileSize, localPitFile);
		FileClose(localPitFile);

		PitData *pitData = new PitData();
+1 −3
Original line number Diff line number Diff line
@@ -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)