mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-29 12:24:13 +00:00
__s64 can be defined as either long or long long, depending on the
architecture. On ppc64le it's defined as long, giving this error:
In file included from btf_dump.c:22:
btf_dump.c: In function 'btf_dump_type_data_check_overflow':
libbpf_internal.h:111:22: error: format '%lld' expects argument of
type 'long long int', but argument 3 has type '__s64' {aka 'long int'}
[-Werror=format=]
111 | libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~
libbpf_internal.h:114:27: note: in expansion of macro '__pr'
114 | #define pr_warn(fmt, ...) __pr(LIBBPF_WARN, fmt, ##__VA_ARGS__)
| ^~~~
btf_dump.c:1992:3: note: in expansion of macro 'pr_warn'
1992 | pr_warn("unexpected size [%lld] for id [%u]\n",
| ^~~~~~~
btf_dump.c:1992:32: note: format string is defined here
1992 | pr_warn("unexpected size [%lld] for id [%u]\n",
| ~~~^
| |
| long long int
| %ld
Cast to size_t and use %zu instead.
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1626475617-25984-3-git-send-email-alan.maguire@oracle.com
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| bpf_core_read.h | ||
| bpf_endian.h | ||
| bpf_gen_internal.h | ||
| bpf_helpers.h | ||
| bpf_prog_linfo.c | ||
| bpf_tracing.h | ||
| bpf.c | ||
| bpf.h | ||
| btf_dump.c | ||
| btf.c | ||
| btf.h | ||
| Build | ||
| gen_loader.c | ||
| hashmap.c | ||
| hashmap.h | ||
| libbpf_common.h | ||
| libbpf_errno.c | ||
| libbpf_internal.h | ||
| libbpf_legacy.h | ||
| libbpf_probes.c | ||
| libbpf.c | ||
| libbpf.h | ||
| libbpf.map | ||
| libbpf.pc.template | ||
| linker.c | ||
| Makefile | ||
| netlink.c | ||
| nlattr.c | ||
| nlattr.h | ||
| ringbuf.c | ||
| skel_internal.h | ||
| str_error.c | ||
| str_error.h | ||
| strset.c | ||
| strset.h | ||
| xsk.c | ||
| xsk.h | ||