diff options
author | Simon Glass <sjg@chromium.org> | 2016-07-22 09:22:46 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-25 12:05:54 -0400 |
commit | 1bb718cdabc0f581e2b3ca1134883ee57d3a910d (patch) | |
tree | df20a82a67d4c2dd38728cb89e2ca5de61e7fb2f /cmd | |
parent | 5923c843ba0e06a90e0c0c5cc6894ac8641377e1 (diff) | |
download | u-boot-1bb718cdabc0f581e2b3ca1134883ee57d3a910d.zip u-boot-1bb718cdabc0f581e2b3ca1134883ee57d3a910d.tar.gz u-boot-1bb718cdabc0f581e2b3ca1134883ee57d3a910d.tar.bz2 |
lzmadec: Use the same type as the lzma call
With sandbox on 32-bit the size_t type can be a little inconsistent. Use
the same type as the caller expects to avoid a compiler warning.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/lzmadec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/lzmadec.c b/cmd/lzmadec.c index 1ad9ed6..c78df82 100644 --- a/cmd/lzmadec.c +++ b/cmd/lzmadec.c @@ -20,7 +20,7 @@ static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { unsigned long src, dst; - unsigned long src_len = ~0UL, dst_len = ~0UL; + SizeT src_len = ~0UL, dst_len = ~0UL; int ret; switch (argc) { @@ -40,7 +40,8 @@ static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) if (ret != SZ_OK) return 1; - printf("Uncompressed size: %ld = 0x%lX\n", src_len, src_len); + printf("Uncompressed size: %ld = %#lX\n", (ulong)src_len, + (ulong)src_len); setenv_hex("filesize", src_len); return 0; |