| json.c: fix a gcc warning - json2tsv - JSON to TSV converter | |
| git clone git://git.codemadness.org/json2tsv | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 917726e20fb722b0097e5be8a2f68ba385c58d66 | |
| parent a6acda04e4f9f2285e126f7045b83bf7e2f8bf39 | |
| Author: Hiltjo Posthuma <[email protected]> | |
| Date: Thu, 29 Apr 2021 12:56:56 +0200 | |
| json.c: fix a gcc warning | |
| gcc -Wall -o json.o -c json.c | |
| json.c: In function 'parsejson': | |
| json.c:94: warning: missing braces around initializer | |
| json.c:94: warning: (near initialization for 'nodes[0]') | |
| Diffstat: | |
| M json.c | 2 +- | |
| 1 file changed, 1 insertion(+), 1 deletion(-) | |
| --- | |
| diff --git a/json.c b/json.c | |
| @@ -91,7 +91,7 @@ capacity(char **value, size_t *sz, size_t cur, size_t inc) | |
| int | |
| parsejson(void (*cb)(struct json_node *, size_t, const char *)) | |
| { | |
| - struct json_node nodes[JSON_MAX_NODE_DEPTH] = { 0 }; | |
| + struct json_node nodes[JSON_MAX_NODE_DEPTH] = { { 0 } }; | |
| size_t depth = 0, p = 0, len, sz = 0; | |
| long cp, hi, lo; | |
| char pri[128], *str = NULL; |