[Skiboot] [PATCH v2 2/4] libflash/ipmi-hiomap: Fix argument type warning on x86-64
Andrew Jeffery
andrew at aj.id.au
Fri Nov 9 11:33:13 AEDT 2018
libflash/ipmi-hiomap.c: In function ‘hiomap_window_move’:
libflash/ipmi-hiomap.c:17:21: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Werror=format=]
#define pr_fmt(fmt) "HIOMAP: " fmt
^~~~~~~~~~
include/skiboot.h:93:41: note: in expansion of macro ‘pr_fmt’
#define prlog(l, f, ...) do { _prlog(l, pr_fmt(f), ##__VA_ARGS__); } while(0)
^~~~~~
include/skiboot.h:94:30: note: in expansion of macro ‘prlog’
#define prerror(fmt...) do { prlog(PR_ERR, fmt); } while(0)
^~~~~
libflash/ipmi-hiomap.c:291:3: note: in expansion of macro ‘prerror’
prerror("Invalid window properties: len: %llu, size: %llu\n",
^~~~~~~
libflash/ipmi-hiomap.c:291:47: note: format string is defined here
prerror("Invalid window properties: len: %llu, size: %llu\n",
~~~^
%lu
Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
libflash/ipmi-hiomap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libflash/ipmi-hiomap.c b/libflash/ipmi-hiomap.c
index 850fb3da338a..ae4b3102bea8 100644
--- a/libflash/ipmi-hiomap.c
+++ b/libflash/ipmi-hiomap.c
@@ -318,7 +318,7 @@ static bool hiomap_window_move(struct ipmi_hiomap *ctx, uint8_t command,
*size = (ctx->current.cur_pos + ctx->current.size) - pos;
if (len != 0 && *size == 0) {
- prerror("Invalid window properties: len: %llu, size: %llu\n",
+ prerror("Invalid window properties: len: %"PRIu64", size: %"PRIu64"\n",
len, *size);
return false;
}
--
2.19.1
More information about the Skiboot
mailing list