Commit c0297f9c authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

test/unit: Fix scan-build errors in thread and util tests



thread_ut.c: ensure that the channel context is non-null
util: get rid of a couple of uninitialized value errors.

Change-Id: Idbaad4efea14acd7ae8f98b60aa514e45213a134
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/424124


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 95d97eb9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -280,6 +280,7 @@ unreg_ch_done(struct spdk_io_channel_iter *i)

	ctx->ch_done = true;

	SPDK_CU_ASSERT_FATAL(i->cur_thread != NULL);
	spdk_for_each_channel_continue(i, 0);
}

+1 −1
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ test_base64_urlsafe_decode(void)
{
	char raw_buf[100];
	void *raw = (void *)raw_buf;
	size_t raw_len;
	size_t raw_len = 0;
	int ret;

	ret = spdk_base64_urlsafe_decode(raw, &raw_len, text_A);
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ test_parse_capacity(void)
	char str[128];
	uint64_t cap;
	int rc;
	bool has_prefix;
	bool has_prefix = true;

	rc = spdk_parse_capacity("472", &cap, &has_prefix);
	CU_ASSERT(rc == 0);