From: Peter Maydell Date: Thu, 20 Feb 2014 19:44:25 +0000 (+0000) Subject: trace: Fix build warnings for Win32 build X-Git-Tag: qemu-xen-4.5.0-rc1~122^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=84f3fe1b077a06ca50f85fa3ff696a8fe094623b;p=qemu-upstream-4.5-testing.git 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 Reviewed-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- diff --git a/trace/control-internal.h b/trace/control-internal.h index cce2da47c..b3f587ed9 100644 --- a/trace/control-internal.h +++ b/trace/control-internal.h @@ -16,15 +16,15 @@ 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)