Received: from eggs.gnu.org ([2001:4830:134:3::10]:39710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGZXo-0006BP-OL for qemu-devel@nongnu.org; Thu, 20 Feb 2014 14:44:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGZXn-0003Sl-Qs for qemu-devel@nongnu.org; Thu, 20 Feb 2014 14:44:28 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGZXn-0003S3-K0 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 14:44:27 -0500 From: Peter Maydell Date: Thu, 20 Feb 2014 19:44:25 +0000 Message-Id: <1392925465-14498-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] trace: Fix build warnings for Win32 build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Weil , Stefan Hajnoczi , patches@linaro.org 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 --- 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