Browse Source

Merge pull request #399 from jonathan-wiens/bugfix/initialize_variable

Avoid uninitialized variable warnings
tags/json-c-0.14-20200419
Eric Haszlakiewicz GitHub 7 years ago
parent
commit
f8eb1dec64
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      json_object.h

+ 2
- 2
json_object.h View File

@@ -523,8 +523,8 @@ JSON_EXPORT void json_object_object_del(struct json_object* obj, const char *key
#else /* ANSI C or MSC */ #else /* ANSI C or MSC */


# define json_object_object_foreach(obj,key,val) \ # define json_object_object_foreach(obj,key,val) \
char *key;\
struct json_object *val; \
char *key = NULL;\
struct json_object *val = NULL; \
struct lh_entry *entry ## key; \ struct lh_entry *entry ## key; \
struct lh_entry *entry_next ## key = NULL; \ struct lh_entry *entry_next ## key = NULL; \
for(entry ## key = json_object_get_object(obj)->head; \ for(entry ## key = json_object_get_object(obj)->head; \


Loading…
Cancel
Save