bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* expects argument of type 'size_t', but argument 5 has type 'Elf64_Xword
@ 2020-08-24  9:00 Naresh Kamboju
  2020-08-26  3:18 ` Andrii Nakryiko
  0 siblings, 1 reply; 2+ messages in thread
From: Naresh Kamboju @ 2020-08-24  9:00 UTC (permalink / raw)
  To: bpf, Netdev, ast, Daniel Borkmann
  Cc: Andrii Nakryiko, Kernel Team, Andrii Nakryiko, lkft-triage,
	Daniel Díaz

while building perf with gcc 7.3.0 on linux next this warning/error is found.

In file included from libbpf.c:55:0:
libbpf.c: In function 'bpf_object__elf_collect':
libbpf_internal.h:74:22: error: format '%zu' expects argument of type
'size_t', but argument 5 has type 'Elf64_Xword {aka long long unsigned
int}' [-Werror=format=]
  libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__);
cc1: all warnings being treated as errors

OE perf build long link,
https://ci.linaro.org/view/lkft/job/openembedded-lkft-linux-next/DISTRO=lkft,MACHINE=am57xx-evm,label=docker-lkft/846/consoleText

- Naresh

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: expects argument of type 'size_t', but argument 5 has type 'Elf64_Xword
  2020-08-24  9:00 expects argument of type 'size_t', but argument 5 has type 'Elf64_Xword Naresh Kamboju
@ 2020-08-26  3:18 ` Andrii Nakryiko
  0 siblings, 0 replies; 2+ messages in thread
From: Andrii Nakryiko @ 2020-08-26  3:18 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: bpf, Netdev, Alexei Starovoitov, Daniel Borkmann, Kernel Team,
	Andrii Nakryiko, lkft-triage, Daniel Díaz

On Mon, Aug 24, 2020 at 2:00 AM Naresh Kamboju
<naresh.kamboju@linaro.org> wrote:
>
> while building perf with gcc 7.3.0 on linux next this warning/error is found.
>
> In file included from libbpf.c:55:0:
> libbpf.c: In function 'bpf_object__elf_collect':
> libbpf_internal.h:74:22: error: format '%zu' expects argument of type
> 'size_t', but argument 5 has type 'Elf64_Xword {aka long long unsigned
> int}' [-Werror=format=]
>   libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__);
> cc1: all warnings being treated as errors
>

You left out the most useful part:

| libbpf.c:2826:4: note: in expansion of macro 'pr_info'
|     pr_info("elf: skipping section(%d) %s (size %zu)\n", idx, name,
sh.sh_size);
|     ^~~~~~~
| libbpf.c:2826:50: note: format string is defined here
|     pr_info("elf: skipping section(%d) %s (size %zu)\n", idx, name,
sh.sh_size);
|                                                 ~~^
|                                                 %llu

But I fixed it as part of [0], thanks.

  [0] https://patchwork.ozlabs.org/project/netdev/patch/20200826030922.2591203-1-andriin@fb.com/

> OE perf build long link,
> https://ci.linaro.org/view/lkft/job/openembedded-lkft-linux-next/DISTRO=lkft,MACHINE=am57xx-evm,label=docker-lkft/846/consoleText
>
> - Naresh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-26  3:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24  9:00 expects argument of type 'size_t', but argument 5 has type 'Elf64_Xword Naresh Kamboju
2020-08-26  3:18 ` Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).