qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] trace: Fix build warnings for Win32 build
@ 2014-02-20 19:44 Peter Maydell
  2014-02-20 21:41 ` Stefan Weil
  2014-02-21 10:07 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2014-02-20 19:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Weil, Stefan Hajnoczi, patches

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>
---
 trace/control-internal.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/trace/control-internal.h b/trace/control-internal.h
index cce2da4..b3f587e 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)
-- 
1.8.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-21 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-20 19:44 [Qemu-devel] [PATCH] trace: Fix build warnings for Win32 build Peter Maydell
2014-02-20 21:41 ` Stefan Weil
2014-02-21 10:07 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).