All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] lib: aes: build failure with DEBUG=1
@ 2020-12-28 16:56 Heinrich Schuchardt
  2020-12-29  3:32 ` Simon Glass
  2021-01-18 13:01 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-12-28 16:56 UTC (permalink / raw)
  To: u-boot

Building fails with DEBUG=1:

lib/aes.c: In function ?debug_print_vector?:
lib/aes.c:622:45: error:
cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
  622 |  printf("%s [%d] @0x%08x", name, num_bytes, (u32)data);

Pointers can only be cast to (uintptr_t). But anyway we have
%p for printing pointers.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/aes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/aes.c b/lib/aes.c
index c998aecb3c..05ec235702 100644
--- a/lib/aes.c
+++ b/lib/aes.c
@@ -619,7 +619,7 @@ void aes_decrypt(u32 key_len, u8 *in, u8 *expkey, u8 *out)
 static void debug_print_vector(char *name, u32 num_bytes, u8 *data)
 {
 #ifdef DEBUG
-	printf("%s [%d] @0x%08x", name, num_bytes, (u32)data);
+	printf("%s [%d] @0x%p", name, num_bytes, data);
 	print_buffer(0, data, 1, num_bytes, 16);
 #endif
 }
--
2.29.2

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

* [PATCH 1/1] lib: aes: build failure with DEBUG=1
  2020-12-28 16:56 [PATCH 1/1] lib: aes: build failure with DEBUG=1 Heinrich Schuchardt
@ 2020-12-29  3:32 ` Simon Glass
  2021-01-18 13:01 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-12-29  3:32 UTC (permalink / raw)
  To: u-boot

On Mon, 28 Dec 2020 at 09:56, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Building fails with DEBUG=1:
>
> lib/aes.c: In function ?debug_print_vector?:
> lib/aes.c:622:45: error:
> cast from pointer to integer of different size
> [-Werror=pointer-to-int-cast]
>   622 |  printf("%s [%d] @0x%08x", name, num_bytes, (u32)data);
>
> Pointers can only be cast to (uintptr_t). But anyway we have
> %p for printing pointers.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  lib/aes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [PATCH 1/1] lib: aes: build failure with DEBUG=1
  2020-12-28 16:56 [PATCH 1/1] lib: aes: build failure with DEBUG=1 Heinrich Schuchardt
  2020-12-29  3:32 ` Simon Glass
@ 2021-01-18 13:01 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-01-18 13:01 UTC (permalink / raw)
  To: u-boot

On Mon, Dec 28, 2020 at 05:56:27PM +0100, Heinrich Schuchardt wrote:

> Building fails with DEBUG=1:
> 
> lib/aes.c: In function ?debug_print_vector?:
> lib/aes.c:622:45: error:
> cast from pointer to integer of different size
> [-Werror=pointer-to-int-cast]
>   622 |  printf("%s [%d] @0x%08x", name, num_bytes, (u32)data);
> 
> Pointers can only be cast to (uintptr_t). But anyway we have
> %p for printing pointers.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210118/f468a2df/attachment.sig>

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

end of thread, other threads:[~2021-01-18 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 16:56 [PATCH 1/1] lib: aes: build failure with DEBUG=1 Heinrich Schuchardt
2020-12-29  3:32 ` Simon Glass
2021-01-18 13:01 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.