bounce_buffer->len_aligned is of type "size_t", but on some arches/compilers
"size_t" might be an alias to whether "int", "long" or their "signed/unsigned"
flavors.

So to make compiler happy we explicitly cast to "int" which is expected in
printf for "%d" format.

this fixes following warning:
--->---
common/bouncebuf.c: In function ‘addr_aligned’:
common/bouncebuf.c:26:3: warning: format ‘%d’ expects argument of type ‘int’, 
but argument 2 has type ‘size_t’ [-Wformat=]
   debug("Unaligned buffer length %d\n", /*(int)*/state->len);
   ^
--->---

Signed-off-by: Alexey Brodkin <abrod...@synopsys.com>
Cc: Vasili Galka <vvv...@gmail.com>
Cc: Tom Rini <tr...@ti.com>
---
 common/bouncebuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/bouncebuf.c b/common/bouncebuf.c
index 9eece6d..0828d4b 100644
--- a/common/bouncebuf.c
+++ b/common/bouncebuf.c
@@ -23,7 +23,7 @@ static int addr_aligned(struct bounce_buffer *state)
 
        /* Check if length is aligned */
        if (state->len != state->len_aligned) {
-               debug("Unaligned buffer length %d\n", state->len);
+               debug("Unaligned buffer length %d\n", (int)state->len);
                return 0;
        }
 
-- 
1.9.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to