Browse Source

Fix initialization warning with jansson 1.3

Luke Dashjr 14 years ago
parent
commit
9631c0b02a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      util.c

+ 3 - 1
util.c

@@ -256,7 +256,7 @@ json_t *json_rpc_call(CURL *curl, const char *url,
 	int rc;
 	int rc;
 	struct data_buffer all_data = {NULL, 0};
 	struct data_buffer all_data = {NULL, 0};
 	struct upload_buffer upload_data;
 	struct upload_buffer upload_data;
-	json_error_t err = {0, 0, 0, "", ""};
+	json_error_t err;
 	struct curl_slist *headers = NULL;
 	struct curl_slist *headers = NULL;
 	char len_hdr[64], user_agent_hdr[128];
 	char len_hdr[64], user_agent_hdr[128];
 	char curl_err_str[CURL_ERROR_SIZE];
 	char curl_err_str[CURL_ERROR_SIZE];
@@ -264,6 +264,8 @@ json_t *json_rpc_call(CURL *curl, const char *url,
 	struct header_info hi = {NULL, false, NULL};
 	struct header_info hi = {NULL, false, NULL};
 	bool probing = false;
 	bool probing = false;
 
 
+	memset(&err, 0, sizeof(err));
+
 	/* it is assumed that 'curl' is freshly [re]initialized at this pt */
 	/* it is assumed that 'curl' is freshly [re]initialized at this pt */
 
 
 	if (probe)
 	if (probe)