test/dif_ut: fix a warning of iov_base garbage value
Compilation Warning on fedora30. dif_ut.c:151:24: warning: The left operand of '==' is a garbage value return (iov->iov_base == iov_base && iov->iov_len == iov_len); ~~~~~~~~~~~~~ ^ This is related to issue #822. Change-Id: Ie050c65d3747c551e2c26e84d3879742eaf86fd8 Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459712 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
bef870c6d0
commit
94c06a68de
@ -1390,7 +1390,7 @@ set_md_interleave_iovs_test(void)
|
||||
{
|
||||
struct spdk_dif_ctx ctx = {};
|
||||
struct spdk_dif_error err_blk = {};
|
||||
struct iovec iov1, iov2, dif_iovs[4];
|
||||
struct iovec iov1, iov2, dif_iovs[4] = {};
|
||||
uint32_t dif_check_flags, data_len, read_len, data_offset, mapped_len = 0;
|
||||
uint8_t *buf1, *buf2;
|
||||
int rc;
|
||||
@ -1519,7 +1519,7 @@ set_md_interleave_iovs_split_test(void)
|
||||
{
|
||||
struct spdk_dif_ctx ctx = {};
|
||||
struct spdk_dif_error err_blk = {};
|
||||
struct iovec iovs1[7], iovs2[7], dif_iovs[8];
|
||||
struct iovec iovs1[7], iovs2[7], dif_iovs[8] = {};
|
||||
uint32_t dif_check_flags, data_len, read_len, data_offset, mapped_len = 0;
|
||||
int rc, i;
|
||||
|
||||
@ -1722,7 +1722,7 @@ dif_generate_stream_test(void)
|
||||
static void
|
||||
set_md_interleave_iovs_alignment_test(void)
|
||||
{
|
||||
struct iovec iovs[3], dif_iovs[5];
|
||||
struct iovec iovs[3], dif_iovs[5] = {};
|
||||
uint32_t mapped_len = 0;
|
||||
int rc;
|
||||
struct spdk_dif_ctx ctx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user