Merge pull request #409 from thefarcry118/master

silenced compiler warnings (unused unsigned size_it)
This commit is contained in:
Henrik Rydgård 2013-01-12 05:46:01 -08:00
commit 02e65c39ce

View File

@ -44,9 +44,9 @@ BlockDevice *constructBlockDevice(const char *filename)
// Check for CISO
FILE *f = fopen(filename, "rb");
char buffer[4];
fread(buffer, 1, 4, f);
auto size = fread(buffer, 1, 4, f); //size_t
fclose(f);
if (!memcmp(buffer, "CISO", 4))
if (!memcmp(buffer, "CISO", 4) && size == 4)
return new CISOFileBlockDevice(filename);
else
return new FileBlockDevice(filename);