Miscellaneous linting in src/engine.

PiperOrigin-RevId: 462415459
Change-Id: I6c79c592613c6b0a665af06faf945586bb6ba32d
This commit is contained in:
Saran Tunyasuvunakool
2022-07-21 10:16:08 -07:00
committed by Copybara-Service
parent eef473b1e1
commit b849023069
19 changed files with 329 additions and 416 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ void* mju_fileToMemory(const char* filename, int* filesize) {
}
// ensure file size fits in int
long long_filesize = ftell(fp);
long long_filesize = ftell(fp); // NOLINT(runtime/int)
if (long_filesize > INT_MAX) {
fclose(fp);
mju_warning_s("File size over 2GB is not supported. File: '%s'", filename);
@@ -62,7 +62,7 @@ void* mju_fileToMemory(const char* filename, int* filesize) {
size_t bytes_read = fread(buffer, 1, *filesize, fp);
// check that read data matches file size
if (bytes_read != *filesize) { // SHOULD NOT OCCUR
if (bytes_read != *filesize) { // SHOULD NOT OCCUR
if (ferror(fp)) {
fclose(fp);
mju_free(buffer);