Merge branch 'js/gcc-8-and-9'
Code clean-up for new compilers. * js/gcc-8-and-9: config: avoid calling `labs()` on too-large data type winansi: simplify loading the GetCurrentConsoleFontEx() function kwset: allow building with GCC 8 poll (mingw): allow compiling with GCC 8 and DEVELOPER=1
This commit is contained in:
4
config.c
4
config.c
@ -896,9 +896,9 @@ static int git_parse_signed(const char *value, intmax_t *ret, intmax_t max)
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
}
|
||||
uval = labs(val);
|
||||
uval = val < 0 ? -val : val;
|
||||
uval *= factor;
|
||||
if (uval > max || labs(val) > uval) {
|
||||
if (uval > max || (val < 0 ? -val : val) > uval) {
|
||||
errno = ERANGE;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user