From patchwork Wed Mar 12 13:46:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 26112 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 0D1C2236AD for ; Wed, 12 Mar 2014 13:48:00 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf39116347iec.4 for ; Wed, 12 Mar 2014 06:48:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=+EtDZTdNlrBu8yx1QLmWdKNMvrTWyJFaDOyamfRjYqo=; b=AAut4MAYZPq7+fFjX1Yr5+4dEI0SMvBgKLLRRmQK8mIR0g67Vj5Xc3X81IGIzB2WT2 W0amANhWYwr5ZiXWi4RYPYsLJOOxWSb24w+jsUwCqKz/dXzLEeUSiWqSuNnLW1aRyD5O fZ/c3LlqpZgvduKb0sWkfdA7GVyEnTyfP78dmftuKUwr1FHqxTfW8QuPZN2qjGJQeQoO ZhfeEtWUkba0ULAiwrdF09YA0x1UtK2tA8IyMKcVWFOrR0795e3VbXogelxw0eFJfAvu tWZdoF2BN4AFzGgkE4uY2z7fccObtzj/sEBepHAQfoXFwnC4FU8NYbhATnJt+y3SaSBy wMEw== X-Gm-Message-State: ALoCoQlzG2Z6ZFWnl5qF11xmmKZqmmbGJr9zj+BnjDKSKmYMK9kwHxNOqG5BMIOW4EcLBn4yBedl X-Received: by 10.182.11.70 with SMTP id o6mr17671796obb.19.1394632080504; Wed, 12 Mar 2014 06:48:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.136 with SMTP id v8ls2960059qgd.17.gmail; Wed, 12 Mar 2014 06:48:00 -0700 (PDT) X-Received: by 10.52.51.226 with SMTP id n2mr102013vdo.57.1394632080353; Wed, 12 Mar 2014 06:48:00 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id w1si6828426vet.49.2014.03.12.06.48.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Mar 2014 06:48:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 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.178; Received: by mail-vc0-f178.google.com with SMTP id im17so3143554vcb.23 for ; Wed, 12 Mar 2014 06:48:00 -0700 (PDT) X-Received: by 10.52.107.35 with SMTP id gz3mr30871280vdb.8.1394632080266; Wed, 12 Mar 2014 06:48:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp289848vck; Wed, 12 Mar 2014 06:48:00 -0700 (PDT) X-Received: by 10.140.98.97 with SMTP id n88mr15368761qge.8.1394632079003; Wed, 12 Mar 2014 06:47:59 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id e61si12483416qgf.26.2014.03.12.06.47.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 12 Mar 2014 06:47:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:60687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNjVm-00082r-CZ for patch@linaro.org; Wed, 12 Mar 2014 09:47:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNjV5-0007OS-Fq for qemu-devel@nongnu.org; Wed, 12 Mar 2014 09:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNjV1-0003Zm-3v for qemu-devel@nongnu.org; Wed, 12 Mar 2014 09:47:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNjV0-0003ZW-TN for qemu-devel@nongnu.org; Wed, 12 Mar 2014 09:47:11 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2CDkx85019290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Mar 2014 09:47:00 -0400 Received: from localhost (dhcp-64-106.muc.redhat.com [10.32.64.106]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s2CDkwNn020544; Wed, 12 Mar 2014 09:46:59 -0400 From: Stefan Hajnoczi To: Date: Wed, 12 Mar 2014 14:46:55 +0100 Message-Id: <1394632015-32573-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1394632015-32573-1-git-send-email-stefanha@redhat.com> References: <1394632015-32573-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Anthony Liguori Subject: [Qemu-devel] [PULL 1/1] trace: Fix build warnings for Win32 build X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Maydell 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 --- 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)