Commit 49e0b6f4 authored by Cengiz Can's avatar Cengiz Can Committed by Arnaldo Carvalho de Melo

perf beauty sockaddr: Fix augmented syscall format warning

The sockaddr related examples given in
`tools/perf/examples/bpf/augmented_syscalls.c` almost always use `long`s
to represent most of their fields.

However, `size_t syscall_arg__scnprintf_sockaddr(..)` has a `scnprintf`
call that uses `"%#x"` as format string.

This throws a warning (whenever the syscall argument is `unsigned
long`).

Added `l` identifier to indicate that the `arg->value` is an unsigned
long.

Not sure about the complications of this with x86 though.
Signed-off-by: default avatarCengiz Can <cengiz@kernel.wtf>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200113174438.102975-1-cengiz@kernel.wtfSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 93e843f9
......@@ -72,5 +72,5 @@ size_t syscall_arg__scnprintf_sockaddr(char *bf, size_t size, struct syscall_arg
if (arg->augmented.args)
return syscall_arg__scnprintf_augmented_sockaddr(arg, bf, size);
return scnprintf(bf, size, "%#x", arg->val);
return scnprintf(bf, size, "%#lx", arg->val);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment