]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Mark the "val" variable in json_object_object_foreach as unused so the compiler doesn...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Thu, 21 Feb 2013 18:32:29 +0000 (12:32 -0600)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Thu, 21 Feb 2013 18:32:29 +0000 (12:32 -0600)
json_object.h
tests/testReplaceExisting.c

index c97850a28280a33587d00d284cbcb27b0f406b5e..e18af8a8ea20ccfa26c8726dccdd5f506dab5f64 100644 (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; \
index 8cc69244b876d8fd150c68780f690a299f191112..6db7b98eca8534835c5b596238a274d1e9132853 100644 (file)
@@ -74,5 +74,5 @@ int main(int argc, char **argv)
 
        json_object_put( my_object );
 
-       return 0;
+       return retval;
 }