mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 18:31:11 +00:00
fix: clear 12 warning sites that only appear away from Windows (#15437)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user