From patchwork Sun Aug 7 01:25:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9266159 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 5BA5A6075A for ; Sun, 7 Aug 2016 01:26:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DD7E28210 for ; Sun, 7 Aug 2016 01:26:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C4162840A; Sun, 7 Aug 2016 01:26:21 +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 6F9DC28210 for ; Sun, 7 Aug 2016 01:26:20 +0000 (UTC) Received: from localhost ([::1]:51095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWCr4-0006P2-RQ for patchwork-qemu-devel@patchwork.kernel.org; Sat, 06 Aug 2016 21:26:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWCqj-0006Og-89 for qemu-devel@nongnu.org; Sat, 06 Aug 2016 21:26:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWCqY-0008IB-SU for qemu-devel@nongnu.org; Sat, 06 Aug 2016 21:25:51 -0400 Received: from mail-yb0-x243.google.com ([2607:f8b0:4002:c09::243]:34468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWCqY-0008I7-Oj for qemu-devel@nongnu.org; Sat, 06 Aug 2016 21:25:46 -0400 Received: by mail-yb0-x243.google.com with SMTP id x196so2252952ybe.1 for ; Sat, 06 Aug 2016 18:25:46 -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=T8sBLNszDmWz+ETZVlQd+3hqf6pCe07xAB6Ha5/9Qrw=; b=qUFVgNaCbsvVVPlTWM/ZkLxTuUcfijx0qFE0MWdBoP8H9TGUDNAaJckOpLxefxYfL3 MvjYioO1LzHAeJet/w55+689cqN/fgNNvnGv/ZmrpASI5IPn+8Us29cBu/hUuC3GS1h2 Zk2CD+3M+nk8uXu7XdckXyd91mNtmU0dYuiq1bMzYLPo6xMz5tKEKRPwZ5GTbCVsLpSV wKEuoxPQYFiAFOflvom128zYp6cxjR1UgNlzcXjrgao1GuZdTbmlUMAApBD6lCKRI+Eh UHK+nyDw9bDJTZqCvAf2rB9VtGVqUX3H+leta+2w55w38NTLYssRqIHMp+OL9zMTtN34 KJww== 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=T8sBLNszDmWz+ETZVlQd+3hqf6pCe07xAB6Ha5/9Qrw=; b=kALHCBfCW7rmyw4G9zsoyjsyFLa1xhKKUqHU8TfJbJig8bvMb82XUXptPzKCLNw4Pq 8LEy2FdauhgV+Q6+hIbGC74RUEH1g3XOq31fFosquSmUbNKMebY72FraIqYdo42dqN4S IO9OkNyNVsh/KrbHfrt9BXCh1JnHCX+F0X3P6w0q1FYGbLqOdZeObrKw21Ln6JTJHtlY G8EJwmitHIMNtAlYJs1a0FCAp+vsfFuiPLdrOW1oVfLZosEIamwihvLx+blL9/FCslM2 vReTJONBpjAs6wPGaJsvLNxhJu4xEbu70Lye6UE9ov7aiFk+9rgMf9FhETg+a0UmSIfG ULDA== X-Gm-Message-State: AEkooutdT3uagwNWgFpxMg4L2lVXlf5NtahM+gV5CwejpRP+mrv6iNjdU6eH/1gHmfcOJg== X-Received: by 10.37.39.5 with SMTP id n5mr60940845ybn.171.1470533146316; Sat, 06 Aug 2016 18:25:46 -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 v185sm11098967ywd.47.2016.08.06.18.25.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 06 Aug 2016 18:25:45 -0700 (PDT) From: Pranith Kumar To: Gerd Hoffmann , qemu-devel@nongnu.org (open list:All patches CC here) Date: Sat, 6 Aug 2016 21:25:45 -0400 Message-Id: <20160807012545.7145-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::243 Subject: [Qemu-devel] [PATCH] spice: Fix warning reg. 'defined' in macro 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 /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 Reviewed-by: Paolo Bonzini --- include/ui/qemu-spice.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index edad5e7..3979a1e 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -42,8 +42,7 @@ int qemu_spice_set_pw_expire(time_t expires); int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, const char *subject); -#define SPICE_NEEDS_SET_MM_TIME \ - (!defined(SPICE_SERVER_VERSION) || (SPICE_SERVER_VERSION < 0xc06)) +#define SPICE_NEEDS_SET_MM_TIME (SPICE_SERVER_VERSION < 0xc06) #if SPICE_SERVER_VERSION >= 0x000c02 void qemu_spice_register_ports(void);