From patchwork Sun Oct 14 20:00:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 12218 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 4155023FB2 for ; Sun, 14 Oct 2012 20:00:44 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 005BDA18D66 for ; Sun, 14 Oct 2012 20:00:43 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so6746428iej.11 for ; Sun, 14 Oct 2012 13:00:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=3h+JXZTci3A1wNqRPLZdZQW8tglr6eOq9jSXJZRPvEA=; b=JVpncVTwVOzTOjCHIZLZ3Tc6L/RVQWZJ5xneXLUm6tc/ttkIKQbAe2sKOOnwe4gV0I pMH9H7zpbMn9RucoTbcXaSZTT4AUScHOatbC9T1gUbQXg91Yld52jfN2+N8C3f6+BTuH 4spW2629+wSmNOvxdh2dg3kkK3p+V7JlDjJoxXdmFiX+Yy1Z1r2eHOC4vbW1IMejieFx LQ3WTfkKmWbiutxC7QKBepOIedtA3FmN9KYdnfpwWkkp6nx7ZcxWnNFCBqCoNd8stKF1 BP3FP6M3lNi6NSCUdY57+K+WgBKii3E1+MaCY3yw5oEyOrk0vtomLKERzcAwQmVOyxJ8 ic5w== Received: by 10.50.168.37 with SMTP id zt5mr6921054igb.57.1350244843460; Sun, 14 Oct 2012 13:00:43 -0700 (PDT) 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.50.67.148 with SMTP id n20csp485730igt; Sun, 14 Oct 2012 13:00:42 -0700 (PDT) Received: by 10.216.136.23 with SMTP id v23mr5495172wei.45.1350244842111; Sun, 14 Oct 2012 13:00:42 -0700 (PDT) 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 m49si14867726wen.79.2012.10.14.13.00.41 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 14 Oct 2012 13:00:42 -0700 (PDT) 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 1TNUMZ-0004Oc-Gd; Sun, 14 Oct 2012 21:00:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Blue Swirl , Stefan Weil Subject: [PATCH] configure: Disable (clang) initializer-overrides warnings Date: Sun, 14 Oct 2012 21:00:39 +0100 Message-Id: <1350244839-16875-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQlTL64F7jCO2760m8fAPqrN+gJnd3rRvZkMHfYw82IaSt2OPnrK8VxbrfDUQTX91YT1+qPP Disable clang's initializer-overrides warnings, as QEMU makes significant use of the pattern of initializing an array with a range-based default entry like [0 ... 0x1ff] = { GPIO_NONE, 0 } followed by specific entries which override that default, and clang would otherwise warn "initializer overrides prior initialization of this subobject" when it encountered the specific entry. Signed-off-by: Peter Maydell --- This is basically a judgement that our coding style is legitimate and the compiler is being overly alarmist. I don't think we would benefit from trying to silence the warnings and I can't think of a clean way of doing so... NB that gcc will happily ignore -Wno-wombat warnings that it doesn't happen to recognize. (For compilers that don't accept-and-ignore the flag configure will identify this and not use it.) Blue Swirl previously submitted a patch which enabled this flag (among others): http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg04203.html I haven't found the other two flags in that patch to be required. configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 353d788..f78cfc5 100755 --- a/configure +++ b/configure @@ -1187,6 +1187,7 @@ gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits" gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags" gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" gcc_flags="-fstack-protector-all -Wendif-labels $gcc_flags" +gcc_flags="-Wno-initializer-overrides $gcc_flags" # Note that we do not add -Werror to gcc_flags here, because that would # enable it for all configure tests. If a configure test failed due # to -Werror this would just silently disable some features,