From f91a993e39f43bf78e9723cec207fd03cf4867d9 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 8 Jan 2019 20:09:02 -0800 Subject: 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 Signed-off-by: Sascha Hauer --- common/memory_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') 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++) { -- cgit v1.2.3