Commit 1b575d83 authored by Szulik, Maciej's avatar Szulik, Maciej Committed by Tomasz Zawadzki
Browse files

lib/nvmf: add explicit iovcnt init to silence LTO related warning



When Link Time Optimization is enabled, compiler can sometimes produce
additional warnings saying that some variables may be uninitialized.

To supress the warning it is enough to add explicit initialization
of the variable causing the issue, in this case 'iovcnt = 0'.

Signed-off-by: default avatarSzulik, Maciej <maciej.szulik@intel.com>
Change-Id: I080b20a6008643ae78c8e3a6c2d183193ef6c1bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14674


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJacek Kalwas <jacek.kalwas@intel.com>
Community-CI: Mellanox Build Bot
parent 9b893966
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -761,7 +761,7 @@ nvmf_bdev_ctrlr_zcopy_start_complete(struct spdk_bdev_io *bdev_io, bool success,
{
	struct spdk_nvmf_request	*req = cb_arg;
	struct iovec *iov;
	int iovcnt;
	int iovcnt = 0;

	if (spdk_unlikely(!success)) {
		int                     sc = 0, sct = 0;