All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Stellard <tstellar@redhat.com>
To: qemu-devel@nongnu.org
Cc: Tom Stellard <tstellar@redhat.com>
Subject: [PATCH] trace/control: Fix -Wunused-but-set-global warning with clang 23+
Date: Wed, 17 Jun 2026 15:41:45 -0700	[thread overview]
Message-ID: <20260617224145.1419961-1-tstellar@redhat.com> (raw)

../trace/control.c:41:13: error: variable 'init_trace_on_startup' set but not used [-Werror,-Wunused-but-set-global]
   41 | static bool init_trace_on_startup;
      |             ^
1 error generated.

Signed-off-by: Tom Stellard <tstellar@redhat.com>
---
 trace/control.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/trace/control.c b/trace/control.c
index 1c8c50064a..49f0a4c5cd 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -38,7 +38,9 @@ static TraceEventGroup *event_groups;
 static size_t nevent_groups;
 static uint32_t next_id;
 static uint32_t next_vcpu_id;
+#ifdef CONFIG_TRACE_SIMPLE
 static bool init_trace_on_startup;
+#endif
 static char *trace_opts_file;
 
 QemuOptsList qemu_trace_opts = {
@@ -295,7 +297,9 @@ void trace_opt_parse(const char *optstr)
         trace_enable_events(qemu_opt_get(opts, "enable"));
     }
     trace_init_events(qemu_opt_get(opts, "events"));
+#ifdef CONFIG_TRACE_SIMPLE
     init_trace_on_startup = true;
+#endif
     g_free(trace_opts_file);
     trace_opts_file = g_strdup(qemu_opt_get(opts, "file"));
     qemu_opts_del(opts);
-- 
2.51.0



             reply	other threads:[~2026-06-17 22:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 22:41 Tom Stellard [this message]
2026-06-18  7:55 ` [PATCH] trace/control: Fix -Wunused-but-set-global warning with clang 23+ Daniel P. Berrangé

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=20260617224145.1419961-1-tstellar@redhat.com \
    --to=tstellar@redhat.com \
    --cc=qemu-devel@nongnu.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.