From f30f09e994240ea2949fc8ecf2754f02e9d4723a Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 7 Jun 2017 16:23:19 -0700 Subject: [PATCH] test/json_util: initialize array values before test Make sure the decoder is filling out my_int[] correctly. This cleans up a scan-build warning about my_int[0] and my_int[1] being garbage values. Change-Id: Ibdef1823d3bccaf41fc57c12f690bb007f673fd0 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/364529 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker --- test/lib/json/util/json_util_ut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/json/util/json_util_ut.c b/test/lib/json/util/json_util_ut.c index 9bc5c8d35..a3b04516b 100755 --- a/test/lib/json/util/json_util_ut.c +++ b/test/lib/json/util/json_util_ut.c @@ -215,7 +215,7 @@ static void test_decode_array(void) { struct spdk_json_val values[4]; - uint32_t my_int[2]; + uint32_t my_int[2] = {0, 0}; char *my_string[2] = {NULL, NULL}; size_t out_size;