2
0
Эх сурвалжийг харах

trace: Fix build warnings for Win32 build

The Win32 build warns about trace/control-internal.h:

warning: 'trace_event_count' declared inline after being called

Fix this by simply reordering trace_event_id() and
trace_event_count().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Peter Maydell 11 жил өмнө
parent
commit
84f3fe1b07

+ 5 - 5
trace/control-internal.h

@@ -16,15 +16,15 @@
 extern TraceEvent trace_events[];
 extern TraceEvent trace_events[];
 
 
 
 
-static inline TraceEvent *trace_event_id(TraceEventID id)
+static inline TraceEventID trace_event_count(void)
 {
 {
-    assert(id < trace_event_count());
-    return &trace_events[id];
+    return TRACE_EVENT_COUNT;
 }
 }
 
 
-static inline TraceEventID trace_event_count(void)
+static inline TraceEvent *trace_event_id(TraceEventID id)
 {
 {
-    return TRACE_EVENT_COUNT;
+    assert(id < trace_event_count());
+    return &trace_events[id];
 }
 }
 
 
 static inline bool trace_event_is_pattern(const char *str)
 static inline bool trace_event_is_pattern(const char *str)