aboutsummaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-02-20 19:44:25 +0000
committerStefan Hajnoczi <stefanha@redhat.com>2014-03-12 14:19:58 +0100
commit84f3fe1b077a06ca50f85fa3ff696a8fe094623b (patch)
treebf9e3e9b910d0f2117fc9a6f31f01bb51fcbdfe1 /trace
parent239618707637ec87eba8c452d2b2f75dc5ca20c7 (diff)
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>
Diffstat (limited to 'trace')
-rw-r--r--trace/control-internal.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/trace/control-internal.h b/trace/control-internal.h
index cce2da47c4..b3f587ed93 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)