X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcurl_json_test.c;h=6c8640c2448bb75fc86b199cfee272f64c95599c;hp=4b9846607f794e3a95c12d171fc3fccea7b69686;hb=06a86a60a7dabc685bdbd81ce3d36ea5f7e2c2d4;hpb=307bf74a8cef765fcd5d788f6aad5b2e9bdf670b diff --git a/src/curl_json_test.c b/src/curl_json_test.c index 4b984660..6c8640c2 100644 --- a/src/curl_json_test.c +++ b/src/curl_json_test.c @@ -52,9 +52,10 @@ static cj_t *test_setup(char *json, char *key_path) { assert(cj_append_key(db, key) == 0); - db->state[0].entry = &(cj_tree_entry_t){ - .type = TREE, .tree = db->tree, - }; + cj_tree_entry_t root = {0}; + root.type = TREE; + root.tree = db->tree; + db->state[0].entry = &root; cj_curl_callback(json, strlen(json), 1, db); #if HAVE_YAJL_V2 @@ -138,7 +139,7 @@ DEF_TEST(parse) { return 0; } -int main(int argc, char **argv) { +int main(void) { cj_submit = test_submit; RUN_TEST(parse);