fix: clear 12 warning sites that only appear away from Windows (#15437)

This commit is contained in:
Kris Austin
2026-09-02 18:18:17 -03:00
committed by GitHub
parent 51fd6327fe
commit 8bf1d3ea84
5 changed files with 30 additions and 13 deletions
+3 -1
View File
@@ -599,7 +599,9 @@ static char* read_json_file(const std::string &preset_path)
return NULL;
}
fread(json_contents, 1, file_size, json_file);
const size_t read_bytes = fread(json_contents, 1, file_size, json_file);
if (read_bytes != static_cast<size_t>(file_size))
BOOST_LOG_TRIVIAL(error) << "Read " << read_bytes << " of " << file_size << " bytes from the JSON file";
fclose(json_file);
return json_contents;