From patchwork Sat Aug 11 15:11:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 176691 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 E908E2C00C5 for ; Sun, 12 Aug 2012 01:11:01 +1000 (EST) Received: from localhost ([::1]:36965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0DL9-0001tV-0e for incoming@patchwork.ozlabs.org; Sat, 11 Aug 2012 11:10:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0DL1-0001tM-Nx for qemu-devel@nongnu.org; Sat, 11 Aug 2012 11:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0DL0-0000eg-Nr for qemu-devel@nongnu.org; Sat, 11 Aug 2012 11:10:51 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:53919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0DL0-0000dm-Gi for qemu-devel@nongnu.org; Sat, 11 Aug 2012 11:10:50 -0400 Received: by eaac13 with SMTP id c13so733484eaa.4 for ; Sat, 11 Aug 2012 08:10:49 -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; bh=PQIbvGQ9ceQJg4MfLhyMKs9f0OlnRPY/8eNABnmB7MI=; b=X1eP4Mhitn8UUaePEEl5wPeJydfQSFYK5JrhQaL7WDe88UqoxnB3zQ1CxlmMaFG7rV GiLlJ2YT4WakhnTDyGPKzoKCFdMYwSA61mWHHzTDwmWBeu/MLeK2pyPqcUDbe3iBA3G+ GfhT55K06kk6UBMjP0DdRTGkhGDRbDHHey9wI02WaxPsq9Jz23yURYkRJiHF3zyn2O+3 QmqbqvuZNXU8lEcPr4nhs1XGtuNsUgSzEZ4DqpeA9qjuvVvt7NZKrrrMX3UNXkzVDEWb Oe4RwAhxQSm8tQfpLGZ3FbWXqATbgUKR9k/tf5zB8JgOUoDd1AlluvHksSLyB7PDnHbe dvnw== Received: by 10.14.181.132 with SMTP id l4mr3126292eem.17.1344697849755; Sat, 11 Aug 2012 08:10:49 -0700 (PDT) Received: from localhost.localdomain ([2001:5c0:1519:100:e60:76ff:fe57:7088]) by mx.google.com with ESMTPS id 9sm4989890eei.12.2012.08.11.08.10.47 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 11 Aug 2012 08:10:48 -0700 (PDT) From: Blue Swirl To: qemu-devel@nongnu.org Date: Sat, 11 Aug 2012 15:11:16 +0000 Message-Id: <47b52597d5bfea96270f281160ca7a2ca256f7c4.1344697837.git.blauwirbel@gmail.com> X-Mailer: git-send-email 1.7.2.5 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 v2] configure: fix double check tests with Clang 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 Configuring with Clang compiler with -Werror would not work after improved checks: /tmp/qemu-conf--25992-.c:4:32: error: self-comparison always evaluates to true [-Werror,-Wtautological-compare] int main(void) { return preadv == preadv; } /tmp/qemu-conf--25992-.c:13:26: error: self-comparison always evaluates to true [-Werror,-Wtautological-compare] return epoll_create1 == epoll_create1; /tmp/qemu-conf--25992-.c:3:13: error: explicitly assigning a variable of type 'char **' to itself [-Werror,-Wself-assign] environ = environ; Avoid the errors by adjusting the tests. Signed-off-by: Blue Swirl Reviewed-by: Peter Maydell --- v1->v2: remove void * casts. --- configure | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 12fdc22..f0dbc03 100755 --- a/configure +++ b/configure @@ -2256,7 +2256,7 @@ cat > $TMPC < #include #include -int main(void) { return preadv == preadv; } +int main(void) { return preadv(0, 0, 0, 0); } EOF preadv=no if compile_prog "" "" ; then @@ -2552,7 +2552,7 @@ int main(void) * warning but not an error, and will proceed to fail the * qemu compile where we compile with -Werror.) */ - return epoll_create1 == epoll_create1; + return (int)(uintptr_t)&epoll_create1; } EOF if compile_prog "" "" ; then @@ -2945,7 +2945,7 @@ has_environ=no cat > $TMPC << EOF #include int main(void) { - environ = environ; + environ = 0; return 0; } EOF