Skip to content
Snippets Groups Projects
Commit ea44c50a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix clang warning: implicit conversion from 'long' to 'double'

changes value from 9223372036854775807 to 9223372036854775808
[-Wimplicit-const-int-float-conversion]
        if(bytes < 0 || bytes > INT64_MAX)
                              ~ ^~~~~~~~~
/usr/include/x86/_stdint.h:90:19: note: expanded from macro 'INT64_MAX'
 #define INT64_MAX       0x7fffffffffffffff
                         ^~~~~~~~~~~~~~~~~~
parent bdd3821e
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3994 passed
......@@ -281,7 +281,7 @@ int64_t parse_byte_count(const char* str, ulong unit)
}
if(unit > 1)
bytes /= unit;
if(bytes < 0 || bytes > INT64_MAX)
if(bytes < 0 || bytes > (double)INT64_MAX)
return INT64_MAX;
return (int64_t)bytes;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment