All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, Ilya Leoshkevich <iii@linux.ibm.com>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: [PATCH] tcg/perf: Placate clang-21's -Wdefault-const-init-field-unsafe
Date: Mon, 19 May 2025 22:48:48 +0100	[thread overview]
Message-ID: <20250519214903.55284-1-iii@linux.ibm.com> (raw)

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



             reply	other threads:[~2025-05-19 21:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 21:48 Ilya Leoshkevich [this message]
2025-05-20  8:32 ` [PATCH] tcg/perf: Placate clang-21's -Wdefault-const-init-field-unsafe Peter Maydell
2025-05-24 13:10 ` Richard Henderson

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=20250519214903.55284-1-iii@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.