Skip to content

Commit

Permalink
Fix a signed/unsigned comparison warning (#27)
Browse files Browse the repository at this point in the history
The signed value in comparison is always positive, so it's safe to just cast it to unsigned.
  • Loading branch information
khavishbhundoo authored and robryk committed Jan 17, 2017
1 parent fec9058 commit e73ba91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guetzli/guetzli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ std::string ReadFileOrDie(FILE* f) {
exit(1);
}
std::unique_ptr<char[]> buf(new char[size]);
if (fread(buf.get(), 1, size, f) != size) {
if (fread(buf.get(), 1, size, f) != (size_t)size) {
perror("fread");
exit(1);
}
Expand Down

0 comments on commit e73ba91

Please sign in to comment.