summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-24 16:14:45 (GMT)
committerSimon Glass <sjg@chromium.org>2016-02-26 15:53:10 (GMT)
commit5eca977935bf58f4227b2681e612a452a0da0286 (patch)
tree695e63fb67a4e8f9a007304dfb013c36fbb8c265
parent0edd82e2448d4aa8f729ac1df8bb55121388a069 (diff)
downloadu-boot-5eca977935bf58f4227b2681e612a452a0da0286.tar.xz
trace: Fix compiler warnings in trace
With min() we must use the same type for each parameter. Fix two problems in trace.c which produce compiler warnings. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r--cmd/trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/trace.c b/cmd/trace.c
index 1e62a1a..1a6d8c3 100644
--- a/cmd/trace.c
+++ b/cmd/trace.c
@@ -43,7 +43,7 @@ static int create_func_list(int argc, char * const argv[])
err = trace_list_functions(buff + buff_ptr, avail, &needed);
if (err)
printf("Error: truncated (%#x bytes needed)\n", needed);
- used = min(avail, needed);
+ used = min(avail, (size_t)needed);
printf("Function trace dumped to %08lx, size %#zx\n",
(ulong)map_to_sysmem(buff + buff_ptr), used);
setenv_hex("profbase", map_to_sysmem(buff));
@@ -67,7 +67,7 @@ static int create_call_list(int argc, char * const argv[])
err = trace_list_calls(buff + buff_ptr, avail, &needed);
if (err)
printf("Error: truncated (%#x bytes needed)\n", needed);
- used = min(avail, needed);
+ used = min(avail, (size_t)needed);
printf("Call list dumped to %08lx, size %#zx\n",
(ulong)map_to_sysmem(buff + buff_ptr), used);