Skip to content

Commit e73ba91

Browse files
khavishbhundoorobryk
authored andcommitted
Fix a signed/unsigned comparison warning (#27)
The signed value in comparison is always positive, so it's safe to just cast it to unsigned.
1 parent fec9058 commit e73ba91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guetzli/guetzli.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ std::string ReadFileOrDie(FILE* f) {
158158
exit(1);
159159
}
160160
std::unique_ptr<char[]> buf(new char[size]);
161-
if (fread(buf.get(), 1, size, f) != size) {
161+
if (fread(buf.get(), 1, size, f) != (size_t)size) {
162162
perror("fread");
163163
exit(1);
164164
}

0 commit comments

Comments
 (0)