summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-08 20:09:02 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-09 08:24:18 +0100
commitf91a993e39f43bf78e9723cec207fd03cf4867d9 (patch)
tree501ac07f7404f55852718008c89f18df4c0b42a8 /common
parent2008b1feccebe61c4d57aa3d55ac57c49a8ec179 (diff)
downloadbarebox-f91a993e39f43bf78e9723cec207fd03cf4867d9.tar.gz
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')
-rw-r--r--common/memory_display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/memory_display.c b/common/memory_display.c
index cd0eadf..fbb8bbb 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++) {