Commit 53cb5d8f authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 4a36aabd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);