mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
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>
This commit is contained in:
parent
0edd82e244
commit
5eca977935
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue