diff options
author | Geoff Levand <geoff@infradead.org> | 2015-02-18 01:00:07 +0000 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-02-18 16:27:00 -0500 |
commit | e932fff3bfa26d7d197727fc89f2e8f5e9609128 (patch) | |
tree | fae95da13706133673ba7087419edc3675a1559d | |
parent | 5a7380559732ae1e776346d9d7c5db0f21c4b358 (diff) |
kexec: Fix compiler format warning
The sizeof operator returns a size_t type. Change the printf format of sizeof
values from %d to %zu. Fixes compiler warnings like these:
kexec/fs2dt.c: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/fs2dt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c index fa7b550..d73e144 100644 --- a/kexec/fs2dt.c +++ b/kexec/fs2dt.c @@ -322,7 +322,7 @@ static void add_usable_mem_property(int fd, size_t len) ranges = malloc(ranges_size * sizeof(*ranges)); if (!ranges) - die("unrecoverable error: can't alloc %d bytes for ranges.\n", + die("unrecoverable error: can't alloc %zu bytes for ranges.\n", ranges_size * sizeof(*ranges)); for (range = 0; range < usablemem_rgns.size; range++) { @@ -345,7 +345,7 @@ static void add_usable_mem_property(int fd, size_t len) sizeof(*ranges)); if (!ranges) die("unrecoverable error: can't realloc" - "%d bytes for ranges.\n", + "%zu bytes for ranges.\n", ranges_size*sizeof(*ranges)); } ranges[rlen++] = cpu_to_be64(loc_base); |