summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2020-04-01 18:33:48 +0300
committerValentin Bartenev <vbart@nginx.com>2020-04-01 18:33:48 +0300
commitbe943c9fd48b3e8d7f3e5be5b2fd251f958c63f7 (patch)
tree57bfa41777e4d1edbc3433c2e9b7f6e626085fc9
parent5954839773a5c2ab5391ea2d99062de23581eee6 (diff)
downloadunit-be943c9fd48b3e8d7f3e5be5b2fd251f958c63f7.tar.gz
unit-be943c9fd48b3e8d7f3e5be5b2fd251f958c63f7.tar.bz2
Fixed build with Clang 10, broken by 32578e837322.
This silences the -Wimplicit-int-float-conversion warning.
-rw-r--r--src/nxt_conf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c
index 7f09dac9..1aca0a7e 100644
--- a/src/nxt_conf.c
+++ b/src/nxt_conf.c
@@ -2142,7 +2142,9 @@ nxt_conf_json_parse_number(nxt_mp_t *mp, nxt_conf_value_t *value, u_char *start,
num = nxt_strtod(value->u.number, &end);
- if (nxt_slow_path(nxt_errno == NXT_ERANGE || fabs(num) > NXT_INT64_T_MAX)) {
+ if (nxt_slow_path(nxt_errno == NXT_ERANGE
+ || fabs(num) > (double) NXT_INT64_T_MAX))
+ {
nxt_conf_json_parse_error(error, start,
"The number is out of representable range. Such JSON number "
"value is not supported."