[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lhufr9y6zw8.fsf@oldenburg.str.redhat.com>
Date: Fri, 28 Nov 2025 14:38:15 +0100
From: Florian Weimer <fweimer@...hat.com>
To: Mikhail Gavrilov <mikhail.v.gavrilov@...il.com>
Cc: bpf@...r.kernel.org, andrii@...nel.org, ast@...nel.org,
daniel@...earbox.net, netdev@...r.kernel.org
Subject: Re: [PATCH v2 bpf-next] tools/lib/bpf: fix -Wdiscarded-qualifiers
under C23
* Mikhail Gavrilov:
> - Use explicit casts instead of changing variable types to const char *,
> because the variables are already declared as char * earlier in the
> functions and used in contexts requiring mutability.
> This is common practice in the kernel when full const-correctness
> cannot be preserved without major refactoring.
What kind of mutability is this about? Obviously char *const won't
work, but const char * seems to be fine for these variables?
Thanks,
Florian
Powered by blists - more mailing lists