Avoid integer modulo by 1, to avoid warning

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/349
This commit is contained in:
David Neto 2016-08-15 11:27:13 -04:00
parent 033b7d00f0
commit 4dd4c14b80

View File

@ -50,7 +50,7 @@ bool ReadFile(const char* filename, const char* mode, std::vector<T>* data) {
return false;
}
} else {
if (ftell(fp) % sizeof(T)) {
if (sizeof(T) != 1 && (ftell(fp) % sizeof(T))) {
fprintf(stderr, "error: corrupted word found in file '%s'\n", filename);
return false;
}