qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcg/perf: Placate clang-21's -Wdefault-const-init-field-unsafe
@ 2025-05-19 21:48 Ilya Leoshkevich
  2025-05-20  8:32 ` Peter Maydell
  2025-05-24 13:10 ` Richard Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Ilya Leoshkevich @ 2025-05-19 21:48 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel, Ilya Leoshkevich, Peter Maydell

clang-21 complains about the const "name" field in struct debug_entry.
While this warning may be too aggressive, there is not too much value
in having const there, so just drop it.

Note: in addition to this fix, I had to turn off the following clang-21
warnings to make the build work:

* -Wno-parentheses-equality
* -Wno-unused-value
* -Wno-tautological-unsigned-enum-zero-compare
* -Wno-tautological-compare

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Closes: https://gitlab.com/qemu-project/qemu/-/issues/2970
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 tcg/perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcg/perf.c b/tcg/perf.c
index 4e8d2c1bee7..f30c5b489d1 100644
--- a/tcg/perf.c
+++ b/tcg/perf.c
@@ -154,7 +154,7 @@ struct debug_entry {
     uint64_t addr;
     int lineno;
     int discrim;
-    const char name[];
+    char name[];
 };
 
 struct jr_code_debug_info {
-- 
2.49.0



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

end of thread, other threads:[~2025-05-24 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-19 21:48 [PATCH] tcg/perf: Placate clang-21's -Wdefault-const-init-field-unsafe Ilya Leoshkevich
2025-05-20  8:32 ` Peter Maydell
2025-05-24 13:10 ` Richard Henderson

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).