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:
@@ -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; \
|
||||
|
||||
@@ -74,5 +74,5 @@ int main(int argc, char **argv)
|
||||
|
||||
json_object_put( my_object );
|
||||
|
||||
return 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user