From patchwork Thu Jan 17 15:52:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14101 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 81C5A23EAD for ; Thu, 17 Jan 2013 15:52:17 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id 3340AA18262 for ; Thu, 17 Jan 2013 15:52:17 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fc26so2619252vbb.17 for ; Thu, 17 Jan 2013 07:52:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=AklPafVVWCD5WqZr8RjAqNu4EY11+nonIYRzVgHLAgs=; b=f04hvOl7UPV3/T8u8QHVmZJ1xz6UKnfW454NSuWK9FMC9QzgbXQx4D2BqSkp+SqZPN Hc1ZrSCtPi4l0N5pUo4eoYIBiHt/itO+gH8aJndKCDDQASQDGbJeVqELOa09p22qfYR/ zppNXbw6kOjtlfldosdNSV1bnWrWWdrhA/4RNQSvXzL85zG4qTLcBWwvsF3gIspPgQlk sRMatVm4kOWUOWRqGHEo7hRb4YKMfVHAl5ahK/ytbDvvUwyzqBbIakG2I6h1mHqEF9UD qPI2szlCtZ9ntY4lFnJxnm5KIpvCact+pNk3AFXTe3lNn0LwbJg/zC3L1cBV5bXWhAXk tsVQ== X-Received: by 10.52.176.6 with SMTP id ce6mr5174753vdc.57.1358437936628; Thu, 17 Jan 2013 07:52:16 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp37308veb; Thu, 17 Jan 2013 07:52:15 -0800 (PST) X-Received: by 10.194.171.198 with SMTP id aw6mr9402352wjc.3.1358437934932; Thu, 17 Jan 2013 07:52:14 -0800 (PST) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id em19si716692wjd.203.2013.01.17.07.52.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 17 Jan 2013 07:52:14 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TvrlA-0000dT-9f; Thu, 17 Jan 2013 15:52:08 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, qemu-trivial@nongnu.org, Paolo Bonzini Subject: [PATCH] qemu-pixman.h: Avoid mutual inclusion loop with console.h Date: Thu, 17 Jan 2013 15:52:08 +0000 Message-Id: <1358437928-2420-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQn1Y37Dy2joE8r3yCYNYTXVi35SmnuNTFRHyfB4nHVNTNw8sMVEy79eDEndDaoRV4zDBwLy Remove an unnecessary mutual inclusion loop between qemu-pixman.h and console.h, since the former was only including the latter for 'PixelFormat*', which can be provided by typedefs.h. This requires a minor adjustment to qemu-pixman.c, which was relying on the implicit inclusion of console.h for the actual struct PixelFormat definition, and on implicitly dragging in a header defining NULL. Signed-off-by: Peter Maydell --- I noticed this because I had an out of tree file which included ui/console.h before qemu-common.h and it didn't compile. But mutual include loops are a bad idea anyway IMHO. include/ui/qemu-pixman.h | 2 +- ui/qemu-pixman.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index 016fd87..b032f52 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -15,7 +15,7 @@ #pragma GCC diagnostic error "-Wredundant-decls" #endif -#include "console.h" +#include "qemu/typedefs.h" /* * pixman image formats are defined to be native endian, diff --git a/ui/qemu-pixman.c b/ui/qemu-pixman.c index 609335a..6dcbe90 100644 --- a/ui/qemu-pixman.c +++ b/ui/qemu-pixman.c @@ -3,7 +3,8 @@ * See the COPYING file in the top-level directory. */ -#include "ui/qemu-pixman.h" +#include "qemu-common.h" +#include "ui/console.h" int qemu_pixman_get_type(int rshift, int gshift, int bshift) {