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: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/424124 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
95d97eb965
commit
c0297f9c71
@ -280,6 +280,7 @@ unreg_ch_done(struct spdk_io_channel_iter *i)
|
|||||||
|
|
||||||
ctx->ch_done = true;
|
ctx->ch_done = true;
|
||||||
|
|
||||||
|
SPDK_CU_ASSERT_FATAL(i->cur_thread != NULL);
|
||||||
spdk_for_each_channel_continue(i, 0);
|
spdk_for_each_channel_continue(i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ test_base64_urlsafe_decode(void)
|
|||||||
{
|
{
|
||||||
char raw_buf[100];
|
char raw_buf[100];
|
||||||
void *raw = (void *)raw_buf;
|
void *raw = (void *)raw_buf;
|
||||||
size_t raw_len;
|
size_t raw_len = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = spdk_base64_urlsafe_decode(raw, &raw_len, text_A);
|
ret = spdk_base64_urlsafe_decode(raw, &raw_len, text_A);
|
||||||
|
@ -142,7 +142,7 @@ test_parse_capacity(void)
|
|||||||
char str[128];
|
char str[128];
|
||||||
uint64_t cap;
|
uint64_t cap;
|
||||||
int rc;
|
int rc;
|
||||||
bool has_prefix;
|
bool has_prefix = true;
|
||||||
|
|
||||||
rc = spdk_parse_capacity("472", &cap, &has_prefix);
|
rc = spdk_parse_capacity("472", &cap, &has_prefix);
|
||||||
CU_ASSERT(rc == 0);
|
CU_ASSERT(rc == 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user