From patchwork Tue Aug 9 19:02:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9272091 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 381E46075A for ; Tue, 9 Aug 2016 19:13:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 220CD28384 for ; Tue, 9 Aug 2016 19:13:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12E03283E2; Tue, 9 Aug 2016 19:13:20 +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 B456328384 for ; Tue, 9 Aug 2016 19:13:19 +0000 (UTC) Received: from localhost ([::1]:37582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXCSk-0001fu-RL for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Aug 2016 15:13:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXCIU-0007lj-MA for qemu-devel@nongnu.org; Tue, 09 Aug 2016 15:02:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXCIQ-0002iC-Op for qemu-devel@nongnu.org; Tue, 09 Aug 2016 15:02:42 -0400 Received: from mail-yw0-x244.google.com ([2607:f8b0:4002:c05::244]:36096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXCIN-0002hF-Ha; Tue, 09 Aug 2016 15:02:35 -0400 Received: by mail-yw0-x244.google.com with SMTP id u134so910436ywg.3; Tue, 09 Aug 2016 12:02:35 -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:in-reply-to:references; bh=QkwVP7TjU2cRz/3mI7VPN56HGQ+d9FQZcVKhb9a0WB0=; b=0FZwOxH3gHZjEDnNpCQ2xgAjWAsmkbRJQON4Z0Dj1oZJ7+7LTqlJ8jgglrMwN20xpV HRvH565bvE27AYcGu8zz5ztDFfGMVFWMZIKuWk2CeOx23zvvhiS1pOyIjcYBhFVOPHT2 6OPEzDdZEo5prMjnDMFGBGtbF39B7YN44JHJ3Wtv7WaHSkge9BErZks46XX7ky9g1bH8 BczqigJJwcV6wNoeJbpKZoTXv05zSljlg/7a1evpC5lsKD+o/Wfp9OYhct5a+WEzfxz5 H0g0vTChkLbJc4T16gqtGX/Q2/S3r5AZ1WaQfs/Zd/mEKjhBmoEhXIPjZkHUFVCSE8i4 F5BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QkwVP7TjU2cRz/3mI7VPN56HGQ+d9FQZcVKhb9a0WB0=; b=IhqE9lqH+pmP9HxWYIoW+FNCxDCTEMizljL163JuBz49bJi0nk58rZ0qcu+buZV5Ad BhxIIn4un6bERjffLv96UiF5TBK8gxO/7Y9I94Vf07ATcgrgFdBAnZ29105854DXxNb5 KTSByQkd6Fp9wB6g0XjZVIlrVCD6MSr0AvJi94F5jmeKhCyMhRMNFPfBg6OB/sWfAEfA kL+t9EY90ajha0ksh0t4YSOV5CyxNMTTXCAfB8gf3g3ItkgbtvjqgMU0fjrJYvz6FB/0 VZ7Qn2zd0UF+7YdFgcfAvUHTd9PutAhfD4TklvRHai0eEbux+DYvdn9892yMSOO1Lj4r 8Lmw== X-Gm-Message-State: AEkooutrhkanzzIw1NOmsvBGdF0fFnzEzRcWxxAzxr/X7jh7j+Iql6yagNpKKRcMIDeo5A== X-Received: by 10.129.166.194 with SMTP id d185mr77872266ywh.247.1470769355057; Tue, 09 Aug 2016 12:02:35 -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 t67sm16659070ywa.33.2016.08.09.12.02.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Aug 2016 12:02:34 -0700 (PDT) From: Pranith Kumar To: Peter Maydell , qemu-arm@nongnu.org (open list:ARM), qemu-devel@nongnu.org (open list:All patches CC here) Date: Tue, 9 Aug 2016 15:02:28 -0400 Message-Id: <20160809190229.27871-5-bobby.prani@gmail.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160809190229.27871-1-bobby.prani@gmail.com> References: <20160809190229.27871-1-bobby.prani@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::244 Subject: [Qemu-devel] [PATCH 5/5] target-arm: Fix warn about implicit conversion 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: , Cc: pbonzini@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Clang warns about an implicit conversion as follows: /mnt/devops/code/qemu/target-arm/neon_helper.c:1075:1: warning: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 128 to -128 [-Wconstant-conversion] NEON_VOP_ENV(qrshl_s8, neon_s8, 4) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/devops/code/qemu/target-arm/neon_helper.c:116:83: note: expanded from macro 'NEON_VOP_ENV' uint32_t HELPER(glue(neon_,name))(CPUARMState *env, uint32_t arg1, uint32_t arg2) \ ^ /mnt/devops/code/qemu/target-arm/neon_helper.c:106:5: note: expanded from macro '\ NEON_VOP_BODY' NEON_DO##n; \ ^~~~~~~~~~ :21:1: note: expanded from here NEON_DO4 ^~~~~~~~ /mnt/devops/code/qemu/target-arm/neon_helper.c:93:5: note: expanded from macro 'NEON_DO4' NEON_FN(vdest.v1, vsrc1.v1, vsrc2.v1); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/devops/code/qemu/target-arm/neon_helper.c:1054:23: note: expanded from macro 'NEON_FN' dest = (1 << (sizeof(src1) * 8 - 1)); \ ~ ~~^~~~~~~~~~~~~~~~~~~~~~~~~ Fix it by casting to appropriate type. Signed-off-by: Pranith Kumar Reviewed-by: Peter Maydell --- target-arm/neon_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c index 1f1844f..ebdf7c9 100644 --- a/target-arm/neon_helper.c +++ b/target-arm/neon_helper.c @@ -1051,7 +1051,7 @@ uint64_t HELPER(neon_qrshl_u64)(CPUARMState *env, uint64_t val, uint64_t shiftop if (tmp >= (ssize_t)sizeof(src1) * 8) { \ if (src1) { \ SET_QC(); \ - dest = (1 << (sizeof(src1) * 8 - 1)); \ + dest = (typeof(dest))(1 << (sizeof(src1) * 8 - 1)); \ if (src1 > 0) { \ dest--; \ } \