Commit 94c06a68 authored by Hailiang Wang's avatar Hailiang Wang Committed by Ben Walker
Browse files

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: default avatarHailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459712


Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent bef870c6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;