diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-21 23:25:57 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-21 23:25:57 +0300 |
| commit | 42451ed4718af3f93770feb201bd023625d69b3a (patch) | |
| tree | 7f69bc86e0fc0591f176ca086db377e1cb99a718 /lib | |
| parent | 1a5248bb177242a34fd51efadb4af941853d5e35 (diff) | |
| download | kmi-42451ed4718af3f93770feb201bd023625d69b3a.tar.gz kmi-42451ed4718af3f93770feb201bd023625d69b3a.zip | |
fix warnings on 32bit riscv
+ Will most probably not work on 32bit, but nice to make 'portable'
code.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fdt_dbg.c | 4 | ||||
| -rw-r--r-- | lib/ubsan.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/fdt_dbg.c b/lib/fdt_dbg.c index 296a8de..bf8e2d9 100644 --- a/lib/fdt_dbg.c +++ b/lib/fdt_dbg.c @@ -76,7 +76,7 @@ static void __print_prop_value(const void *data, int len) const int32_t *p = (const int32_t *)data; dbg("<"); for (int i = 0; i < len / 4; ++i) - dbg("%#08x%s", fdt32_to_cpu(p[i]), + dbg("%#08x%s", (unsigned int)fdt32_to_cpu(p[i]), i < (len / 4 - 1) ? " " : ""); dbg(">"); @@ -84,7 +84,7 @@ static void __print_prop_value(const void *data, int len) const int32_t *p = (const int32_t *)data; dbg("["); for (int i = 0; i < len / 4; ++i) - dbg("%#02x%s", fdt32_to_cpu(p[i]), + dbg("%#02x%s", (unsigned int)fdt32_to_cpu(p[i]), i < (len / 4 - 1) ? " " : ""); dbg("]"); diff --git a/lib/ubsan.c b/lib/ubsan.c index 906ba46..7f4df2a 100644 --- a/lib/ubsan.c +++ b/lib/ubsan.c @@ -71,8 +71,8 @@ struct tu_invalid_builtin_data { static void tu_print_location(const char *message, struct tu_source_location loc) { - bug("ubsan: %s at file %s, line %d, column %d\n", message, loc.file, - loc.line, loc.column); + bug("ubsan: %s at file %s, line %ju, column %ju\n", message, loc.file, + (uintmax_t)loc.line, (uintmax_t)loc.column); } void __ubsan_handle_add_overflow(struct tu_overflow_data *data) |
