Skip to contentSkip to conversation

Tracing patches

GIT PULL Applied Stefan Hajnoczi 1 participant 3 messages Jun 18 – Jun 20

lore
Share & tools
lore
#1 lore raw

[PULL 1/1] trace/control: Fix -Wunused-but-set-global warning with clang 23+

In reply to Stefan Hajnoczi

From: Tom Stellard <[email protected]>

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

Message-id: [email protected]

---
 trace/control.c | 4 ++++
 1 file changed, 4 insertions(+)
trace/control.c +4 -0
index 1c8c50064a..49f0a4c5cd 100644
@@ -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);
Signature · 1 line
2.54.0
#0 lore raw

The following changes since commit c7cf7c810153d6f5f31aa2d5c0dee9087f6b4dff:

Merge tag 'firmware-20260617-pull-request' of https://gitlab.com/kraxel/qemu into staging (2026-06-17 10:17:29 -0400)

are available in the Git repository at:

https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to c0f8130a31759f75335466074f80dba6de2b1a16:

trace/control: Fix -Wunused-but-set-global warning with clang 23+ (2026-06-18 11:01:40 -0400)

----------------------------------------------------------------
Pull request

----------------------------------------------------------------

Tom Stellard (1):
trace/control: Fix -Wunused-but-set-global warning with clang 23+

 trace/control.c | 4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
2.54.0