This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 9ed047b5e61e7226595c54570847455f8d31d996 Author: Bowen Wang <[email protected]> AuthorDate: Thu Oct 29 11:20:02 2026 +0800 include/nuttx/pci: evaluate dev in the MMIO accessors pci_{read,write}_mmio_*() take a dev argument but never expand it, so a local that only feeds dev is reported unused: drivers/pci/pci_ivshmem.c:94:29: error: unused variable 'priv' [-Werror=unused-variable] Evaluate it as (void)(dev), as the I/O accessors already use it. Signed-off-by: Bowen Wang <[email protected]> --- include/nuttx/pci/pci.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/nuttx/pci/pci.h b/include/nuttx/pci/pci.h index 82a4ff18377..a36543209e8 100644 --- a/include/nuttx/pci/pci.h +++ b/include/nuttx/pci/pci.h @@ -202,34 +202,36 @@ while (0) #define pci_write_mmio_byte(dev, addr, val) \ - *((FAR volatile uint8_t *)(addr)) = val + ((void)(dev), *((FAR volatile uint8_t *)(addr)) = val) #define pci_write_mmio_word(dev, addr, val) \ - *((FAR volatile uint16_t *)(addr)) = val + ((void)(dev), *((FAR volatile uint16_t *)(addr)) = val) #define pci_write_mmio_dword(dev, addr, val) \ - *((FAR volatile uint32_t *)(addr)) = val + ((void)(dev), *((FAR volatile uint32_t *)(addr)) = val) #define pci_write_mmio_qword(dev, addr, val) \ do \ { \ + (void)(dev); \ *((FAR volatile uint32_t *)(addr)) = (uint32_t)(val); \ *((FAR volatile uint32_t *)((FAR char *)(addr) + sizeof(uint32_t))) = (val) >> 32; \ } \ while (0) #define pci_read_mmio_byte(dev, addr, val) \ - *(val) = *((FAR volatile uint8_t *)(addr)) + ((void)(dev), *(val) = *((FAR volatile uint8_t *)(addr))) #define pci_read_mmio_word(dev, addr, val) \ - *(val) = *((FAR volatile uint16_t *)(addr)) + ((void)(dev), *(val) = *((FAR volatile uint16_t *)(addr))) #define pci_read_mmio_dword(dev, addr, val) \ - *(val) = *((FAR volatile uint32_t *)(addr)) + ((void)(dev), *(val) = *((FAR volatile uint32_t *)(addr))) #define pci_read_mmio_qword(dev, addr, val) \ do \ { \ + (void)(dev); \ *(val) = *((FAR volatile uint32_t *)(addr)) | \ *((FAR volatile uint32_t *)((FAR char *)(addr) + sizeof(uint32_t))); \ } \
