fix a warning when compiling for 32-bit
Subsystems (2)
PATCH 1/1 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
| %xSigned-off-by Sergei Antonov <[email protected]>
--- bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bnxt.c +1 -1
@@ -63,7 +63,7 @@ int bnxt_dump_regs(struct ethtool_drvinfo *info __maybe_unused, struct ethtool_rreturn 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 ; }
Signature · 1 line
2.34.1
This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:
Hello:
This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:
Quoted 10 lines · On Wed, 2 Nov 2022 08:41:15 +0300 you wrote:
Since
BNXT_PCIE_STATS_LENissize_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[...]
Here is the summary with links:
- [ethtool] fix a warning when compiling for 32-bit
https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=cbd784424577
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html