From ceb601188b04d871fcf480aba69a2a6435f409f4 Mon Sep 17 00:00:00 2001 From: Richael Zhuang Date: Mon, 2 Mar 2020 13:27:14 +0800 Subject: [PATCH] test: fix error about unittest_thread uninitialised parameters When running unittest_thread in fedora29 with memcheck, there is error "Conditional jump or move depends on uninitialised value(s)" in for_each_channel_unreg test. Signed-off-by: Richael Zhuang Change-Id: I38abf4c70ff513e39232b83357d571dded8f02c3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1072 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Tomasz Zawadzki --- test/unit/lib/thread/thread.c/thread_ut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/lib/thread/thread.c/thread_ut.c b/test/unit/lib/thread/thread.c/thread_ut.c index a563f8bdd..dae6df345 100644 --- a/test/unit/lib/thread/thread.c/thread_ut.c +++ b/test/unit/lib/thread/thread.c/thread_ut.c @@ -550,7 +550,7 @@ for_each_channel_unreg(void) struct spdk_io_channel *ch0; struct io_device *dev; struct unreg_ctx ctx = {}; - int io_target; + int io_target = 0; allocate_threads(1); set_thread(0);