Skip to content

Commit

Permalink
pci: fix address domain format size
Browse files Browse the repository at this point in the history
[ upstream commit 8517072 ]

the struct rte_pci_addr defines domain as uint32_t variable however
the PCI_PRI_FMT macro used for logging the struct sets the format
of domain to uint16_t.

The mismatch causes the following warning messages
in Windows clang build:

format specifies type 'unsigned short' but the argument
has type 'uint32_t' (aka 'unsigned int') [-Wformat]

Fixes: af75078 ("first public release")

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
  • Loading branch information
tal-sh authored and kevintraynor committed Jul 17, 2020
1 parent fca3fc1 commit e195163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/librte_pci/rte_pci.h
Expand Up @@ -28,7 +28,7 @@ extern "C" {
#include <rte_interrupts.h>

/** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
#define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
#define PCI_PRI_FMT "%.4" PRIx32 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
#define PCI_PRI_STR_SIZE sizeof("XXXXXXXX:XX:XX.X")

/** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */
Expand Down

0 comments on commit e195163

Please sign in to comment.