|  | @@ -34,7 +34,7 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  static const char *ep;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -const char *cJSON_GetErrorPtr() {return ep;}
 | 
	
		
			
				|  |  | +const char *cJSON_GetErrorPtr(void) {return ep;}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  static int cJSON_strcasecmp(const char *s1,const char *s2)
 | 
	
		
			
				|  |  |  {
 | 
	
	
		
			
				|  | @@ -70,7 +70,7 @@ void cJSON_InitHooks(cJSON_Hooks* hooks)
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /* Internal constructor. */
 | 
	
		
			
				|  |  | -static cJSON *cJSON_New_Item()
 | 
	
		
			
				|  |  | +static cJSON *cJSON_New_Item(void)
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |  	cJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON));
 | 
	
		
			
				|  |  |  	if (node) memset(node,0,sizeof(cJSON));
 | 
	
	
		
			
				|  | @@ -167,13 +167,13 @@ static const char *parse_string(cJSON *item,const char *str)
 | 
	
		
			
				|  |  |  				case 'u':	 /* transcode utf16 to utf8. */
 | 
	
		
			
				|  |  |  					sscanf(ptr+1,"%4x",&uc);ptr+=4;	/* get the unicode char. */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -					if ((uc>=0xDC00 && uc<=0xDFFF) || uc==0)	break;	// check for invalid.
 | 
	
		
			
				|  |  | +					if ((uc>=0xDC00 && uc<=0xDFFF) || uc==0)	break;	/* check for invalid.	*/
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -					if (uc>=0xD800 && uc<=0xDBFF)	// UTF16 surrogate pairs.
 | 
	
		
			
				|  |  | +					if (uc>=0xD800 && uc<=0xDBFF)	/* UTF16 surrogate pairs.	*/
 | 
	
		
			
				|  |  |  					{
 | 
	
		
			
				|  |  | -						if (ptr[1]!='\\' || ptr[2]!='u')	break;	// missing second-half of surrogate.
 | 
	
		
			
				|  |  | +						if (ptr[1]!='\\' || ptr[2]!='u')	break;	/* missing second-half of surrogate.	*/
 | 
	
		
			
				|  |  |  						sscanf(ptr+3,"%4x",&uc2);ptr+=6;
 | 
	
		
			
				|  |  | -						if (uc2<0xDC00 || uc2>0xDFFF)		break;	// invalid second-half of surrogate.
 | 
	
		
			
				|  |  | +						if (uc2<0xDC00 || uc2>0xDFFF)		break;	/* invalid second-half of surrogate.	*/
 | 
	
		
			
				|  |  |  						uc=0x10000 | ((uc&0x3FF)<<10) | (uc2&0x3FF);
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -498,14 +498,14 @@ void   cJSON_ReplaceItemInArray(cJSON *array,int which,cJSON *newitem)		{cJSON *
 | 
	
		
			
				|  |  |  void   cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem){int i=0;cJSON *c=object->child;while(c && cJSON_strcasecmp(c->string,string))i++,c=c->next;if(c){newitem->string=cJSON_strdup(string);cJSON_ReplaceItemInArray(object,i,newitem);}}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /* Create basic types: */
 | 
	
		
			
				|  |  | -cJSON *cJSON_CreateNull()						{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_NULL;return item;}
 | 
	
		
			
				|  |  | -cJSON *cJSON_CreateTrue()						{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_True;return item;}
 | 
	
		
			
				|  |  | -cJSON *cJSON_CreateFalse()						{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_False;return item;}
 | 
	
		
			
				|  |  | +cJSON *cJSON_CreateNull(void)					{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_NULL;return item;}
 | 
	
		
			
				|  |  | +cJSON *cJSON_CreateTrue(void)					{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_True;return item;}
 | 
	
		
			
				|  |  | +cJSON *cJSON_CreateFalse(void)					{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_False;return item;}
 | 
	
		
			
				|  |  |  cJSON *cJSON_CreateBool(int b)					{cJSON *item=cJSON_New_Item();if(item)item->type=b?cJSON_True:cJSON_False;return item;}
 | 
	
		
			
				|  |  |  cJSON *cJSON_CreateNumber(double num)			{cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_Number;item->valuedouble=num;item->valueint=(int)num;}return item;}
 | 
	
		
			
				|  |  |  cJSON *cJSON_CreateString(const char *string)	{cJSON *item=cJSON_New_Item();if(item){item->type=cJSON_String;item->valuestring=cJSON_strdup(string);}return item;}
 | 
	
		
			
				|  |  | -cJSON *cJSON_CreateArray()						{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Array;return item;}
 | 
	
		
			
				|  |  | -cJSON *cJSON_CreateObject()						{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Object;return item;}
 | 
	
		
			
				|  |  | +cJSON *cJSON_CreateArray(void)					{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Array;return item;}
 | 
	
		
			
				|  |  | +cJSON *cJSON_CreateObject(void)					{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Object;return item;}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /* Create Arrays: */
 | 
	
		
			
				|  |  |  cJSON *cJSON_CreateIntArray(int *numbers,int count)				{int i;cJSON *n=0,*p=0,*a=cJSON_CreateArray();for(i=0;a && i<count;i++){n=cJSON_CreateNumber(numbers[i]);if(!i)a->child=n;else suffix_object(p,n);p=n;}return a;}
 |