aboutsummaryrefslogtreecommitdiffstats
path: root/lib/json.c
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@vmiklos.hu>2013-01-01 16:31:22 +0100
committerMiklos Vajna <vmiklos@vmiklos.hu>2013-01-01 16:31:22 +0100
commiteab8e52503885305ea652bf99a48f7a584ddc1cd (patch)
treec269d39c6a00225d20b137c444fb8b80b8283736 /lib/json.c
parente6298e5a2b57a12ff0a10e15030823af89c734cb (diff)
json: fix uninitialized variables
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]
Diffstat (limited to 'lib/json.c')
-rw-r--r--lib/json.c4
1 files changed, 2 insertions, 2 deletions
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;