diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-08 20:09:02 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-09 08:24:18 +0100 |
commit | f91a993e39f43bf78e9723cec207fd03cf4867d9 (patch) | |
tree | 501ac07f7404f55852718008c89f18df4c0b42a8 /common/memory_display.c | |
parent | 2008b1feccebe61c4d57aa3d55ac57c49a8ec179 (diff) | |
download | barebox-f91a993e39f43bf78e9723cec207fd03cf4867d9.tar.gz barebox-f91a993e39f43bf78e9723cec207fd03cf4867d9.tar.xz |
memory_display: Fix type of argument passed to %*s
On AArch64, pointer arithmetic in (pos - line) resolves into "long
int", whereas "%*s" is expecting regular "int". Add explicit cast to
avoid compiler warnings.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/memory_display.c')
-rw-r--r-- | common/memory_display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/memory_display.c b/common/memory_display.c index cd0eadf88d..fbb8bbb6fa 100644 --- a/common/memory_display.c +++ b/common/memory_display.c @@ -96,7 +96,7 @@ int __pr_memory_display(int level, const void *addr, loff_t offs, unsigned nbyte offs += size; } - pos += sprintf(pos, "%*s", 61 - (pos - line), ""); + pos += sprintf(pos, "%*s", (int)(61 - (pos - line)), ""); cp = linebuf; for (i = 0; i < linebytes; i++) { |