diff options
author | Sergei Antonov <saproj@gmail.com> | 2022-11-02 08:41:15 +0300 |
---|---|---|
committer | Michal Kubecek <mkubecek@suse.cz> | 2022-11-02 09:00:04 +0100 |
commit | cbd784424577a6df7a7592e9904a22b5c5d599b7 (patch) | |
tree | 79b93a6277cc6fa55a6022ccb0e59c7b171dcb76 | |
parent | 1b7d16496cc8eae7857746f04c845282f27ea7a7 (diff) | |
download | ethtool-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |