Menu

#45 warning: floating constant exceeds range of 'double'

v1.0 (example)
unread
warning (1)
5
2015-04-07
2015-04-07
pustekuchen
No

Hello Dave Gamble,

Thanks for the great work. I'm using the cJSON Library with a PIC µC.

The following warning is shown:
cJSON/cJSON.c:171:4: warning: floating constant exceeds range of 'double'

Its the following line:
if (fabs(floor(d)-d)<=DBL_EPSILON && fabs(d)<1.0e60L)sprintf(str,"%.0f",d);

It can be fixed by changing 1.0e60 to 1.0e60L

with kind regards
mvollmer

Discussion


Log in to post a comment.