ports/devel/json-c/files/patch-json_object.c
Sunpoet Po-Chuan Hsieh 7c4033b5bc Fix build with Clang 10
PR:		244233
Submitted by:	dim
2020-02-21 20:25:00 +00:00

14 lines
483 B
C

--- json_object.c.orig 2020-02-18 20:12:20 UTC
+++ json_object.c
@@ -698,9 +698,9 @@ int64_t json_object_get_int64(const struct json_object
case json_type_int:
return jso->o.c_int64;
case json_type_double:
- if (jso->o.c_double >= INT64_MAX)
+ if (jso->o.c_double >= (double)INT64_MAX)
return INT64_MAX;
- if (jso->o.c_double <= INT64_MIN)
+ if (jso->o.c_double <= (double)INT64_MIN)
return INT64_MIN;
return (int64_t)jso->o.c_double;
case json_type_boolean: