From patchwork Tue Aug 9 02:35:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9270097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4990E607D6 for ; Tue, 9 Aug 2016 02:36:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AC3D283EB for ; Tue, 9 Aug 2016 02:36:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EA83283F5; Tue, 9 Aug 2016 02:36:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BE380283EB for ; Tue, 9 Aug 2016 02:36:10 +0000 (UTC) Received: from localhost ([::1]:33092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWwtl-0006i2-RC for patchwork-qemu-devel@patchwork.kernel.org; Mon, 08 Aug 2016 22:36:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWwtT-0006hv-Up for qemu-devel@nongnu.org; Mon, 08 Aug 2016 22:35:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWwtQ-00013q-67 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 22:35:51 -0400 Received: from mail-yb0-x242.google.com ([2607:f8b0:4002:c09::242]:36433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWwtQ-00013K-0z for qemu-devel@nongnu.org; Mon, 08 Aug 2016 22:35:48 -0400 Received: by mail-yb0-x242.google.com with SMTP id o3so3732124ybo.3 for ; Mon, 08 Aug 2016 19:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=yHzOu117jVI+i9tve7FIQLBMOwyXSxIdj5+Vnx3OSAU=; b=kcpoGE1awM60q3gbVzJ0UyCOrtUyMIbbUMP+NE19kopqGc8y9wtmvjCQyEJ11j2ZJH 7kx/x3+andGHLz0/ckR7x8t1NOIreeL5JDJD4sa9ieVk3uy7C84pIzkOuJDlUIFGm80U gELybn/JP/Pf1d52M40hFjO8YuGDlsNOxAM1quFukdeqWtELXtIMWZTaBqSxqn8lkvqr Lw63GLcXxoess8/OZ/85fWubshbIZsnembRNrJFeM3pkfB0enNb4LG9o2+YDkErKtmqt IRoH4JacQt2QQcYZi4TulbS5DFuHrodD9tCA7lNGxWoXjszVIsaTiGfA3nOssMnlFzAn lHoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=yHzOu117jVI+i9tve7FIQLBMOwyXSxIdj5+Vnx3OSAU=; b=NJOA6DsyFGcte1XgTCtM5B1NKXNMXeOID+M+1ecPakfv+b364Y+fSNvlAhN5/jZDeN W5jYD9HAZB0qEiE/H/d3lRgAWSugV5h6SrWQcMuK/rtmYjdEhM56E4Y5v46rFPEiXLLq /uzl45GlVsdScNCG2TOrlU8Ftw4wKBN0i9l7qTDAfgJdXjfk3QSf5sysUZOz11A9Fm+F kR739na3jzccDCIF5bqpTE7vFQHmrsc+TVMi+dCdYWZ5JV9LTwxxHw6A/hpMeVo4NiIH rA4Ar4n3Tw9xtwtbRxdlK0rcCeCTKV/vhA6Lffv3/1I/1okeiRuMN9dY9AgIveDjlAaC /cYA== X-Gm-Message-State: AEkooutVTjOi/uOhp14UF7qqFAg0+SsRJqU75ZhVU74nKD2FM9DoF1dT8R5wnEQafkcv8A== X-Received: by 10.37.221.198 with SMTP id u189mr66299260ybg.14.1470710147436; Mon, 08 Aug 2016 19:35:47 -0700 (PDT) Received: from evgadesktop.attlocal.net (108-232-152-155.lightspeed.tukrga.sbcglobal.net. [108.232.152.155]) by smtp.gmail.com with ESMTPSA id v84sm15198855ywb.48.2016.08.08.19.35.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Aug 2016 19:35:45 -0700 (PDT) From: Pranith Kumar To: "Daniel P. Berrange" , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefano Stabellini , qemu-devel@nongnu.org (open list:All patches CC here) Date: Mon, 8 Aug 2016 22:35:44 -0400 Message-Id: <20160809023545.30204-1-bobby.prani@gmail.com> X-Mailer: git-send-email 2.9.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c09::242 Subject: [Qemu-devel] [PATCH] clang: Disable warning about expansion to 'defined' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Clang produces the following warning. The warning is detailed here: https://reviews.llvm.org/D15866. Disable the warning. /home/pranith/devops/code/qemu/hw/display/qxl.c:507:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if SPICE_NEEDS_SET_MM_TIME ^ /home/pranith/devops/code/qemu/include/ui/qemu-spice.h:46:5: note: expanded from macro 'SPICE_NEEDS_SET_MM_TIME' (!defined(SPICE_SERVER_VERSION) || (SPICE_SERVER_VERSION < 0xc06)) ^ /home/pranith/devops/code/qemu/hw/display/qxl.c:1074:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if SPICE_NEEDS_SET_MM_TIME ^ /home/pranith/devops/code/qemu/include/ui/qemu-spice.h:46:5: note: expanded from macro 'SPICE_NEEDS_SET_MM_TIME' (!defined(SPICE_SERVER_VERSION) || (SPICE_SERVER_VERSION < 0xc06)) Signed-off-by: Pranith Kumar --- configure | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure b/configure index f57fcc6..a1a6e3f 100755 --- a/configure +++ b/configure @@ -3025,6 +3025,19 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then fi fi +# Silence clang warnings about expansion to 'defined' in macro +cat > $TMPC << EOF +#define TEST (defined(DUMMY)) +#if TEST +int main(void) { return 0; } +#endif +EOF +if ! compile_prog "-Werror" ; then + if cc_has_warning_flag "-Wno-expansion-to-defined"; then + CFLAGS="-Wno-expansion-to-defined $CFLAGS" + fi +fi + ########################################## # SHA command probe for modules if test "$modules" = yes; then