Skip to content

Commit c6afad0

Browse files
stweilzdenop
authored andcommitted
Fix compiler warning (-Wsign-compare) (#1385)
gcc reports this warning about 250 times: ccutil/genericvector.h:378:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent 15638a5 commit c6afad0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ccutil/genericvector.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ inline bool LoadDataFromFile(const char* filename, GenericVector<char>* data) {
375375
// Trying to open a directory on Linux sets size to LONG_MAX. Catch it here.
376376
if (size > 0 && size < LONG_MAX) {
377377
data->resize_no_init(size);
378-
result = fread(&(*data)[0], 1, size, fp) == size;
378+
result = static_cast<long>(fread(&(*data)[0], 1, size, fp)) == size;
379379
}
380380
fclose(fp);
381381
}

0 commit comments

Comments
 (0)