mirror of
https://github.com/kgabis/parson.git
synced 2025-02-05 17:05:29 +00:00
Remove redundant code
Found by clang-check. (the last one looks like a false-positive to me) parson.c:995:17: warning: Value stored to 'buf' is never read buf += written; ^ ~~~~~~~ parson.c:1016:17: warning: Value stored to 'buf' is never read buf += written; ^ ~~~~~~~ parson.c:1834:24: warning: Array access (via field 'names') results in a null pointer dereference if (strcmp(object->names[i], name) == 0) { ^~~~~~~~~~~~~~~~ 3 warnings generated.
This commit is contained in:
parent
102a4467e1
commit
ec00fea18c
6
parson.c
6
parson.c
@ -991,9 +991,6 @@ static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int le
|
|||||||
if (written < 0) {
|
if (written < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (buf != NULL) {
|
|
||||||
buf += written;
|
|
||||||
}
|
|
||||||
written_total += written;
|
written_total += written;
|
||||||
return written_total;
|
return written_total;
|
||||||
case JSONBoolean:
|
case JSONBoolean:
|
||||||
@ -1012,9 +1009,6 @@ static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int le
|
|||||||
if (written < 0) {
|
if (written < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (buf != NULL) {
|
|
||||||
buf += written;
|
|
||||||
}
|
|
||||||
written_total += written;
|
written_total += written;
|
||||||
return written_total;
|
return written_total;
|
||||||
case JSONNull:
|
case JSONNull:
|
||||||
|
Loading…
Reference in New Issue
Block a user