From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/9] fastboot: use correct format specifier for size_t
Date: Tue, 27 May 2025 22:13:52 +0200 [thread overview]
Message-ID: <20250527201359.889550-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250527201359.889550-1-a.fatoum@pengutronix.de>
When we start checking for format specifier to be correct in a follow-up
commit, we will get warnings that we are printing a size_t as if it were
an int. Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/fastboot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/fastboot.c b/common/fastboot.c
index 56bc4e82c4fe..de50797f31d8 100644
--- a/common/fastboot.c
+++ b/common/fastboot.c
@@ -398,7 +398,7 @@ void fastboot_download_finished(struct fastboot *fb)
printf("\n");
- fastboot_tx_print(fb, FASTBOOT_MSG_INFO, "Downloading %d bytes finished",
+ fastboot_tx_print(fb, FASTBOOT_MSG_INFO, "Downloading %zu bytes finished",
fb->download_bytes);
fastboot_tx_print(fb, FASTBOOT_MSG_OKAY, "");
@@ -421,7 +421,7 @@ static void cb_download(struct fastboot *fb, const char *cmd)
fb->download_size = simple_strtoul(cmd, NULL, 16);
fb->download_bytes = 0;
- fastboot_tx_print(fb, FASTBOOT_MSG_INFO, "Downloading %d bytes...",
+ fastboot_tx_print(fb, FASTBOOT_MSG_INFO, "Downloading %zu bytes...",
fb->download_size);
init_progression_bar(fb->download_size);
@@ -446,7 +446,7 @@ static void cb_download(struct fastboot *fb, const char *cmd)
void fastboot_start_download_generic(struct fastboot *fb)
{
- fastboot_tx_print(fb, FASTBOOT_MSG_DATA, "%08x", fb->download_size);
+ fastboot_tx_print(fb, FASTBOOT_MSG_DATA, "%08zx", fb->download_size);
}
static void __maybe_unused cb_boot(struct fastboot *fb, const char *opt)
--
2.39.5
next prev parent reply other threads:[~2025-05-27 20:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 20:13 [PATCH 1/9] lib: stackprot: fix type for %pS Ahmad Fatoum
2025-05-27 20:13 ` Ahmad Fatoum [this message]
2025-05-27 20:13 ` [PATCH 3/9] Makefile: don't warn over zero-size format string Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 4/9] scripts: define __printf attribute macro Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 5/9] treewide: specify __printf attribute directly on static definition Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 6/9] treewide: replace attribute with shorter __printf macro Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 7/9] treewide: add missing __printf attributes Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 8/9] vsprintf: add %ps format specifier for symbols without offset Ahmad Fatoum
2025-05-27 20:13 ` [PATCH 9/9] lib: random: print get_crypto_bytes caller when no HWRNG is registered Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250527201359.889550-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox