# HG changeset patch # User Kevin Sapper <mail@kevinsapper.de> # Date 1592896586 -7200 # Tue Jun 23 09:16:26 2020 +0200 # Node ID 44d29c9446b193b35b856ae20f798e698d450cc0 # Parent 29641daa261d1c9b505f05bde93ea098028a5494 Problem: WError error on macosx because NAN is a float Solution: Add explicit cast from NAN to double diff --git a/cJSON.c b/cJSON.c --- a/cJSON.c +++ b/cJSON.c @@ -106,7 +106,7 @@ { if (!cJSON_IsNumber(item)) { - return NAN; + return (double) NAN; } return item->valuedouble;