Re: [PATCH v2 bpf-next] tools/lib/bpf: fix -Wdiscarded-qualifiers under C23

From
Florian Weimer <hidden>
Date
2025-11-28 13:38:26
Also in
bpf
* Mikhail Gavrilov:
quoted hunk
- 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
Thread (1 message) 1 message, 1 author, last reply 2025-11-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help