From patchwork Thu Feb 20 19:44:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25090 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3D849203C6 for ; Thu, 20 Feb 2014 19:44:32 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf8874548iec.4 for ; Thu, 20 Feb 2014 11:44:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe:content-type:content-transfer-encoding; bh=2Q8WvDin5u9q8NH2IMzeGK270uXceL6lDJIrXpQ3Pr4=; b=CamrGNUcy25zBeEpuiFURTPL/2/7tOf1F1KT6wwrM5rCYA/23mORz3N1Jm2RfklBPf RhjKtDZH7fVsQj+IthNEh5NeIY0hdrHysxYMIh44ft8x/nClcWbQbHIQOwjBtRNQIGwM rnTFtOgOUwN/LA4wJDj/NjHV0SJRVaoBbjLC0ytqr0nVx2rJE+G4+++oIWZYiz6DVeXu mn3AhKfTHgx6Hrj8tcDtqrt6A7K9A74U8Q83oXl2tgkhoyUvpcCHwegFKoZ2uM4bDal7 EDCFX9hOCEMg+gGOjVlaBetYEowk5b0xKX755b/2OmKzqASf3E2aaWA9tpUSf6p3v0FF jBrA== X-Gm-Message-State: ALoCoQkkth4wNjJ4cgGU97CsYRO5I19dIGXVX2JW6vXTnN73DYN4CnO9m2elknpNMpz2rUaj12bH X-Received: by 10.50.56.39 with SMTP id x7mr72240igp.6.1392925471198; Thu, 20 Feb 2014 11:44:31 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.161 with SMTP id o30ls709385qga.94.gmail; Thu, 20 Feb 2014 11:44:31 -0800 (PST) X-Received: by 10.220.98.204 with SMTP id r12mr2131907vcn.48.1392925471055; Thu, 20 Feb 2014 11:44:31 -0800 (PST) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id si3si1895548vcb.103.2014.02.20.11.44.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 11:44:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ij19so2287824vcb.6 for ; Thu, 20 Feb 2014 11:44:31 -0800 (PST) X-Received: by 10.220.192.71 with SMTP id dp7mr2065372vcb.45.1392925470959; Thu, 20 Feb 2014 11:44:30 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp83845vcz; Thu, 20 Feb 2014 11:44:30 -0800 (PST) X-Received: by 10.181.12.16 with SMTP id em16mr8797901wid.3.1392925470111; Thu, 20 Feb 2014 11:44:30 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ga2si480430wic.72.2014.02.20.11.44.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 20 Feb 2014 11:44:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WGZXl-0003mJ-ST; Thu, 20 Feb 2014 19:44:25 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Stefan Hajnoczi , Stefan Weil Subject: [PATCH] trace: Fix build warnings for Win32 build Date: Thu, 20 Feb 2014 19:44:25 +0000 Message-Id: <1392925465-14498-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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)