From patchwork Mon Jul 30 16:04:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 174037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F19182C008C for ; Tue, 31 Jul 2012 02:05:13 +1000 (EST) Received: from localhost ([::1]:55313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvsT1-0003mY-UQ for incoming@patchwork.ozlabs.org; Mon, 30 Jul 2012 12:05:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvsSC-0001tV-Iv for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:04:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvsS6-0000Xn-PC for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:04:20 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:39253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvsS6-0000Vh-Io for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:04:14 -0400 Received: by mail-ey0-f173.google.com with SMTP id h1so1159287eaa.4 for ; Mon, 30 Jul 2012 09:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=EJzQelYKcc1gq8KneqUT5UwHJPcC7Ua8dbiDMfWzGjw=; b=Uz1hnjdSOJcWMNw31Oao0kWAEYHLP/cJweX+3bfItxHxba/tfYXn9tw/zHwNHFpHfR GtzwG2at+Vt5GU4u69V/ypIqZiUjTEXI1OesZn6cjQLeCjP238N6G89zD7mS88oW8oS3 fthbI0K8lJOfWe+pXv3SDDM5kkF82rhYgPjP7DmfUJm4NLvqoSZz6j6TPUakxoRvm5ae D/yb1XGHnzXsHxQU93XS7UzlYpNz9ITvE/15z2x1RzkXjPr7TKWdwGfGT02qgJX4I4mq hPvXROH44SXomu9eaE0ky7ZsMODp0SgOzJjmdJJ7kIr7oNncSUtc1WO5MymZ/Y6iaRoT 6L0A== Received: by 10.14.179.135 with SMTP id h7mr12782145eem.35.1343664254212; Mon, 30 Jul 2012 09:04:14 -0700 (PDT) Received: from localhost.localdomain (blueswirl.broker.freenet6.net. [2001:5c0:1400:b::d5a3]) by mx.google.com with ESMTPS id k41sm6346971eep.13.2012.07.30.09.04.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jul 2012 09:04:12 -0700 (PDT) From: blauwirbel@gmail.com To: qemu-devel@nongnu.org Date: Mon, 30 Jul 2012 16:04:35 +0000 Message-Id: <25942a670d12b1fd431e5a0d498ff50cef80433e.1343664167.git.blauwirbel@gmail.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.173 Cc: blauwirbel@gmail.com Subject: [Qemu-devel] [PATCH 5/5] configure: disable a few Clang compiler warnings 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Blue Swirl Clang compiler warns about a few constructs in QEMU code. It's possible to avoid those but that needs more work. Suppress some warnings for Clang compiler. -Wno-unused-value would conflict with GCC. Signed-off-by: Blue Swirl --- configure | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/configure b/configure index c65b5f6..e32f188 100755 --- a/configure +++ b/configure @@ -1154,17 +1154,20 @@ if test -z "$werror" ; then fi fi +# GCC flags 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" +# Clang flags +clang_flags="-Wno-initializer-overrides -Wno-self-assign -Wno-constant-conversion" if test "$werror" = "yes" ; then gcc_flags="-Werror $gcc_flags" fi cat > $TMPC << EOF int main(void) { return 0; } EOF -for flag in $gcc_flags; do +for flag in $gcc_flags $clang_flags; do if compile_prog "-Werror $flag" "" ; then QEMU_CFLAGS="$QEMU_CFLAGS $flag" fi