BPF List
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Sam James <sam@gentoo.org>
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
	yonghong.song@linux.dev, john.fastabend@gmail.com,
	kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
	jolsa@kernel.org, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] libbpf: workaround (another) -Wmaybe-uninitialized false positive
Date: Fri, 06 Sep 2024 21:20:30 +0000	[thread overview]
Message-ID: <172565763053.2526156.9088578633898489528.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <f6962729197ae7cdf4f6d1512625bd92f2322d31.1725630494.git.sam@gentoo.org>

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Fri,  6 Sep 2024 14:48:14 +0100 you wrote:
> We get this with GCC 15 -O3 (at least):
> ```
> libbpf.c: In function ‘bpf_map__init_kern_struct_ops’:
> libbpf.c:1109:18: error: ‘mod_btf’ may be used uninitialized [-Werror=maybe-uninitialized]
>  1109 |         kern_btf = mod_btf ? mod_btf->btf : obj->btf_vmlinux;
>       |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> libbpf.c:1094:28: note: ‘mod_btf’ was declared here
>  1094 |         struct module_btf *mod_btf;
>       |                            ^~~~~~~
> In function ‘find_struct_ops_kern_types’,
>     inlined from ‘bpf_map__init_kern_struct_ops’ at libbpf.c:1102:8:
> libbpf.c:982:21: error: ‘btf’ may be used uninitialized [-Werror=maybe-uninitialized]
>   982 |         kern_type = btf__type_by_id(btf, kern_type_id);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> libbpf.c: In function ‘bpf_map__init_kern_struct_ops’:
> libbpf.c:967:21: note: ‘btf’ was declared here
>   967 |         struct btf *btf;
>       |                     ^~~
> ```
> 
> [...]

Here is the summary with links:
  - libbpf: workaround (another) -Wmaybe-uninitialized false positive
    https://git.kernel.org/bpf/bpf-next/c/8a3f14bb1e94

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      reply	other threads:[~2024-09-06 21:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 13:48 [PATCH] libbpf: workaround (another) -Wmaybe-uninitialized false positive Sam James
2024-09-06 21:20 ` patchwork-bot+netdevbpf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172565763053.2526156.9088578633898489528.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sam@gentoo.org \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox