summaryrefslogtreecommitdiff
path: root/json_object.h
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2013-02-21 12:32:29 -0600
committerEric Haszlakiewicz <erh+git@nimenees.com>2013-02-21 12:32:29 -0600
commit9b64c05ff9feb1cdb1e5ae5e134e5e6ff85dbb1b (patch)
treeed5600266771b5386bb647183dd6826621d2f8d8 /json_object.h
parentbfb329223aecf7f47da2b8ece4bd8e421c7bfc6d (diff)
Mark the "val" variable in json_object_object_foreach as unused so the compiler doesn't complain. Fix warnings in the testReplaceExisting test.
Diffstat (limited to 'json_object.h')
-rw-r--r--json_object.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/json_object.h b/json_object.h
index c97850a..e18af8a 100644
--- a/json_object.h
+++ b/json_object.h
@@ -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; \