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 <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/364529
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Daniel Verkamp 2017-06-07 16:23:19 -07:00
parent 66a0a5d4ff
commit f30f09e994

View File

@ -215,7 +215,7 @@ static void
test_decode_array(void) test_decode_array(void)
{ {
struct spdk_json_val values[4]; struct spdk_json_val values[4];
uint32_t my_int[2]; uint32_t my_int[2] = {0, 0};
char *my_string[2] = {NULL, NULL}; char *my_string[2] = {NULL, NULL};
size_t out_size; size_t out_size;