lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210515064907.28235-1-heiko.thiery@gmail.com>
Date:   Sat, 15 May 2021 08:49:08 +0200
From:   Heiko Thiery <heiko.thiery@...il.com>
To:     netdev@...r.kernel.org
Cc:     Ben Hutchings <bhutchings@...arflare.com>,
        Heiko Thiery <heiko.thiery@...il.com>
Subject: [PATCH] Fix warning due to format mismatch for field width argument to fprintf()

bnxt.c:66:54: 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

Signed-off-by: Heiko Thiery <heiko.thiery@...il.com>
---
 bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bnxt.c b/bnxt.c
index b46db72..0c62d1e 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%x\n",
 			BNXT_PXP_REG_LEN + BNXT_PCIE_STATS_LEN);
 		return -1;
 	}
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ