Skip to content

Commit 49e0b6f

Browse files
cengiz-ioacmel
authored andcommitted
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: Cengiz Can <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 93e843f commit 49e0b6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/trace/beauty/sockaddr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ size_t syscall_arg__scnprintf_sockaddr(char *bf, size_t size, struct syscall_arg
7272
if (arg->augmented.args)
7373
return syscall_arg__scnprintf_augmented_sockaddr(arg, bf, size);
7474

75-
return scnprintf(bf, size, "%#x", arg->val);
75+
return scnprintf(bf, size, "%#lx", arg->val);
7676
}

0 commit comments

Comments
 (0)