aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergei Antonov <saproj@gmail.com>2022-11-02 08:41:15 +0300
committerMichal Kubecek <mkubecek@suse.cz>2022-11-02 09:00:04 +0100
commitcbd784424577a6df7a7592e9904a22b5c5d599b7 (patch)
tree79b93a6277cc6fa55a6022ccb0e59c7b171dcb76
parent1b7d16496cc8eae7857746f04c845282f27ea7a7 (diff)
downloadethtool-cbd784424577a6df7a7592e9904a22b5c5d599b7.tar.gz
fix a warning when compiling for 32-bit
Since BNXT_PCIE_STATS_LEN is size_t: ../../ethtool/bnxt.c:66:68: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=] 66 | fprintf(stdout, "Length is too short, expected 0x%lx\n", | ~~^ | | | long unsigned int | %x Fixes: a2f813eeecf1 ("bnxt: Add Broadcom driver support.") Signed-off-by: Sergei Antonov <saproj@gmail.com>
-rw-r--r--bnxt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bnxt.c b/bnxt.c
index b46db72..2b0ac76 100644
--- a/bnxt.c
+++ b/bnxt.c
@@ -63,7 +63,7 @@ int bnxt_dump_regs(struct ethtool_drvinfo *info __maybe_unused, struct ethtool_r
return 0;
if (regs->len < (BNXT_PXP_REG_LEN + BNXT_PCIE_STATS_LEN)) {
- fprintf(stdout, "Length is too short, expected 0x%lx\n",
+ fprintf(stdout, "Length is too short, expected 0x%zx\n",
BNXT_PXP_REG_LEN + BNXT_PCIE_STATS_LEN);
return -1;
}