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: Kamil Godzwon <kamilx.godzwon@intel.com> Change-Id: I4e383ac41b46d13df0210bf90f11f6130290f243 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16127 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
d33042fb11
commit
6665722214
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user