Skip to content

Commit 1d75b0f

Browse files
casting to size_t to allow comparason of values
1 parent 5519941 commit 1d75b0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/logic/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ int32_t fossil_fstream_read_all(fossil_fstream_t *stream, void **buffer, size_t
529529
}
530530

531531
size_t bytes_read = fread(*buffer, 1, file_size, stream->file);
532-
if (bytes_read != file_size) {
532+
if ((size_t)bytes_read != (size_t)file_size) {
533533
fprintf(stderr, "Error: File not found\n");
534534
free(*buffer);
535535
return FOSSIL_ERROR_FILE_NOT_FOUND;

0 commit comments

Comments
 (0)