Commit 1f2536e2 authored by Maciej Szulik's avatar Maciej Szulik Committed by Konrad Sztyber
Browse files

ioat: add explicit var init to silence LTO related warning

This is one of the issues that randomly starts to occur when LTO
is enabled and some custom SPDK app is built.
It causes a maybe-uninitialized warning to pop up.

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

For more examples see https://github.com/spdk/spdk/issues/2661
or https://review.spdk.io/gerrit/c/spdk/spdk/+/14849

.

Signed-off-by: default avatarMaciej Szulik <maciej.szulik@intel.com>
Change-Id: I1c8633f96b383b54c9a723093577688fd186a360
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24951


Reviewed-by: default avatarTomasz Zawadzki <tomasz@tzawadzki.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJacek Kalwas <jacek.kalwas@intel.com>
Community-CI: Mellanox Build Bot
parent 3b207588
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -575,7 +575,7 @@ int
spdk_ioat_build_copy(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_cb cb_fn,
		     void *dst, const void *src, uint64_t nbytes)
{
	struct ioat_descriptor	*last_desc;
	struct ioat_descriptor	*last_desc = NULL;
	uint64_t	remaining, op_size;
	uint64_t	vdst, vsrc;
	uint64_t	pdst_addr, psrc_addr, dst_len, src_len;