Mark the "val" variable in json_object_object_foreach as unused so the compiler doesn't complain. Fix warnings in the testReplaceExisting test.

This commit is contained in:
Eric Haszlakiewicz
2013-02-21 12:32:29 -06:00
parent bfb329223a
commit 9b64c05ff9
2 changed files with 2 additions and 2 deletions

View File

@@ -309,7 +309,7 @@ extern void json_object_object_del(struct json_object* obj, const char *key);
# define json_object_object_foreach(obj,key,val) \
char *key; \
struct json_object *val; \
struct json_object *val __attribute__((__unused__)); \
for(struct lh_entry *entry ## key = json_object_get_object(obj)->head, *entry_next ## key = NULL; \
({ if(entry ## key) { \
key = (char*)entry ## key->k; \

View File

@@ -74,5 +74,5 @@ int main(int argc, char **argv)
json_object_put( my_object );
return 0;
return retval;
}