Commit 66657222 authored by Kamil Godzwon's avatar Kamil Godzwon Committed by Tomasz Zawadzki
Browse files

lib/vmd: fix build with clang 15



Used (void) on cmd and removed increment to fix
clang 15 werror.
vmd.c:368:11: error: variable 'cmd' set but not used [-Werror,-Wunused-but-set-variable]
          uint16_t cmd = dev->header->zero.command;
                   ^
1 error generated.

Signed-off-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I4e383ac41b46d13df0210bf90f11f6130290f243
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16127


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent d33042fb
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -365,8 +365,11 @@ vmd_assign_base_addrs(struct vmd_pci_device *dev)

	/* Enable device MEM and bus mastering */
	dev->header->zero.command |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
	uint16_t cmd = dev->header->zero.command;
	cmd++;
	/*
	 * Writes to the pci config space is posted write. To ensure transaction reaches its destination
	 * before another write is posed, an immediate read of the written value should be performed.
	 */
	{ uint16_t cmd = dev->header->zero.command; (void)cmd; }

	if (dev->msix_cap && ret_val) {
		table_offset = ((volatile struct pci_msix_cap *)dev->msix_cap)->msix_table_offset;