From eab8e52503885305ea652bf99a48f7a584ddc1cd Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 1 Jan 2013 16:31:22 +0100 Subject: json: fix uninitialized variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit json.c: In function ‘json_parse_ex’: json.c:260:30: warning: ‘string_length’ may be used uninitialized in this function [-Wmaybe-uninitialized] json.c:358:16: warning: ‘string’ may be used uninitialized in this function [-Wmaybe-uninitialized] --- lib/json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/json.c') diff --git a/lib/json.c b/lib/json.c index 52e22d0e..fb973001 100644 --- a/lib/json.c +++ b/lib/json.c @@ -212,8 +212,8 @@ json_value * json_parse_ex (json_settings * settings, const json_char * json, ch { json_uchar uchar; unsigned char uc_b1, uc_b2, uc_b3, uc_b4; - json_char * string; - unsigned int string_length; + json_char * string = 0; + unsigned int string_length = 0; top = root = 0; flags = flag_seek_value; -- cgit v1.2.3