From 53bd4ef992e1e878966e1ea1b87b50a6e6ad14f2 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Wed, 23 Feb 2022 08:42:01 +0100 Subject: [PATCH] json: fix win32 warnings --- src/json/decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json/decode.c b/src/json/decode.c index d20668225..9e71c18cf 100644 --- a/src/json/decode.c +++ b/src/json/decode.c @@ -66,7 +66,7 @@ static bool is_number(long double *d, bool *isfloat, const struct pl *pl) return false; exp = true; - e = neg ? -v : v; + e = (int64_t)(neg ? -v : v); v = 0; mul = 1; neg = false; @@ -154,7 +154,7 @@ static int decode_value(struct json_value *val, const struct pl *pl) } else { val->type = JSON_INT; - val->v.integer = dbl; + val->v.integer = (int64_t)dbl; } } else if (!pl_strcasecmp(pl, "false")) {