Commit 1bb718cdabc0f581e2b3ca1134883ee57d3a910d

Authored by Simon Glass
Committed by Tom Rini
1 parent 5923c843ba

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>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

... ... @@ -20,7 +20,7 @@
20 20 static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
21 21 {
22 22 unsigned long src, dst;
23   - unsigned long src_len = ~0UL, dst_len = ~0UL;
  23 + SizeT src_len = ~0UL, dst_len = ~0UL;
24 24 int ret;
25 25  
26 26 switch (argc) {
... ... @@ -40,7 +40,8 @@
40 40  
41 41 if (ret != SZ_OK)
42 42 return 1;
43   - printf("Uncompressed size: %ld = 0x%lX\n", src_len, src_len);
  43 + printf("Uncompressed size: %ld = %#lX\n", (ulong)src_len,
  44 + (ulong)src_len);
44 45 setenv_hex("filesize", src_len);
45 46  
46 47 return 0;