mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-27 02:24:47 +08:00
cppcheck uninitialized vars (false positive)
This commit is contained in:
parent
048291dcb3
commit
0fbc101ac5
1 changed files with 6 additions and 3 deletions
|
@ -1429,9 +1429,12 @@ static void json_next_cb(void *userdata, const char *name, size_t name_len,
|
||||||
|
|
||||||
static void *json_next(const char *s, int len, void *handle, const char *path,
|
static void *json_next(const char *s, int len, void *handle, const char *path,
|
||||||
struct json_token *key, struct json_token *val, int *i) {
|
struct json_token *key, struct json_token *val, int *i) {
|
||||||
struct json_token tmpval, *v = val == NULL ? &tmpval : val;
|
struct json_token tmpval;
|
||||||
struct json_token tmpkey, *k = key == NULL ? &tmpkey : key;
|
struct json_token *v = val == NULL ? &tmpval : val;
|
||||||
int tmpidx, *pidx = i == NULL ? &tmpidx : i;
|
struct json_token tmpkey;
|
||||||
|
struct json_token *k = key == NULL ? &tmpkey : key;
|
||||||
|
int tmpidx;
|
||||||
|
int *pidx = i == NULL ? &tmpidx : i;
|
||||||
struct next_data data = {handle, path, (int) strlen(path), 0, k, v, pidx};
|
struct next_data data = {handle, path, (int) strlen(path), 0, k, v, pidx};
|
||||||
json_walk(s, len, json_next_cb, &data);
|
json_walk(s, len, json_next_cb, &data);
|
||||||
return data.found ? data.handle : NULL;
|
return data.found ? data.handle : NULL;
|
||||||
|
|
Loading…
Reference in a new issue