[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48d38fb0-a144-4c32-9d3d-da8ea2fe08d1@linux.dev>
Date: Thu, 17 Jul 2025 21:06:12 -0700
From: Yonghong Song <yonghong.song@...ux.dev>
To: Matteo Croce <technoboy85@...il.com>, bpf@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Matteo Croce <teknoraver@...a.com>
Subject: Re: [PATCH bpf-next] libbpf: fix warning
On 7/17/25 1:03 PM, Matteo Croce wrote:
> From: Matteo Croce <teknoraver@...a.com>
>
> When compiling libbpf with some compilers, this warning is triggered:
>
> libbpf.c: In function ‘bpf_object__gen_loader’:
> libbpf.c:9209:28: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
> 9209 | gen = calloc(sizeof(*gen), 1);
> | ^
> libbpf.c:9209:28: note: earlier argument should specify number of elements, later size of each element
>
> Fix this by inverting the calloc() arguments.
>
> Signed-off-by: Matteo Croce <teknoraver@...a.com>
Acked-by: Yonghong Song <yonghong.song@...ux.dev>
Powered by blists - more mailing lists