diff --git a/cJSON.c b/cJSON.c index 0ce5f08..3cb8254 100644 --- a/cJSON.c +++ b/cJSON.c @@ -383,6 +383,7 @@ static char *print_array(cJSON *item,int depth,int fmt) char *out=0,*ptr,*ret;int len=5; cJSON *child=item->child; int numentries=0,i=0,fail=0; + size_t tmplen=0; /* How many entries in the array? */ while (child) numentries++,child=child->next; @@ -425,7 +426,7 @@ static char *print_array(cJSON *item,int depth,int fmt) ptr=out+1;*ptr=0; for (i=0;ichild; int numentries=0,fail=0; + size_t tmplen=0; /* Count the number of entries. */ while (child) numentries++,child=child->next; /* Explicitly handle empty object case */ @@ -524,7 +526,7 @@ static char *print_object(cJSON *item,int depth,int fmt) for (i=0;i