mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fs: ubootvarfs: use correct format specifier for pointer diff
@ 2019-10-30 11:11 Lucas Stach
  2019-11-04  8:08 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2019-10-30 11:11 UTC (permalink / raw)
  To: barebox

The difference between two pointers is represented as a ptrdiff_t, use the
correct format specifier when printing to get rid of the following warning
in a 64bit build:

warning: format '%x' expects argument of type 'unsigned int',
but argument 3 has type 'long int' [-Wformat=]

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 fs/ubootvarfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ubootvarfs.c b/fs/ubootvarfs.c
index 81ec05d5efaa..475e4b7a79c4 100644
--- a/fs/ubootvarfs.c
+++ b/fs/ubootvarfs.c
@@ -409,7 +409,7 @@ static void ubootvarfs_parse(struct ubootvarfs_data *data, char *blob,
 
 			list_add_tail(&var->list, &data->var_list);
 		} else {
-			pr_err("No separator in data @ 0x%08x. Skipped.",
+			pr_err("No separator in data @ 0x%08tx. Skipped.",
 			       blob - start);
 			free(var);
 		}
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs: ubootvarfs: use correct format specifier for pointer diff
  2019-10-30 11:11 [PATCH] fs: ubootvarfs: use correct format specifier for pointer diff Lucas Stach
@ 2019-11-04  8:08 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-11-04  8:08 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Wed, Oct 30, 2019 at 12:11:49PM +0100, Lucas Stach wrote:
> The difference between two pointers is represented as a ptrdiff_t, use the
> correct format specifier when printing to get rid of the following warning
> in a 64bit build:
> 
> warning: format '%x' expects argument of type 'unsigned int',
> but argument 3 has type 'long int' [-Wformat=]
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  fs/ubootvarfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-04  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 11:11 [PATCH] fs: ubootvarfs: use correct format specifier for pointer diff Lucas Stach
2019-11-04  8:08 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox