From 53cb5d8fa655aacb8e773eefb39cf63cf57c4657 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 16 May 2016 10:41:04 -0700 Subject: [PATCH] test/json: initialize variable to silence warning If spdk_json_number_to_int32() works correctly, it will initialize the value of i32, but since this is a unit test, we should make sure i32 is initialized to catch bugs. Fixes a clang warning during scan-build. Change-Id: Iecf0531d2992acf584b10e2de5f8c53553a9f3b6 Signed-off-by: Daniel Verkamp --- 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 5d994bf6d8..c2930dcc60 100644 --- a/test/lib/json/util/json_util_ut.c +++ b/test/lib/json/util/json_util_ut.c @@ -83,7 +83,7 @@ test_num_to_int32(void) { struct spdk_json_val v; char buf[100]; - int32_t i32; + int32_t i32 = 0; NUM_SETUP("1234"); CU_ASSERT(spdk_json_number_to_int32(&v, &i32) == 0);