From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyeH2-000556-Nz for qemu-devel@nongnu.org; Tue, 17 Nov 2015 06:18:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyeGx-0003Sg-QI for qemu-devel@nongnu.org; Tue, 17 Nov 2015 06:18:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyeGx-0003Sc-Lo for qemu-devel@nongnu.org; Tue, 17 Nov 2015 06:18:03 -0500 From: Stefan Hajnoczi Date: Tue, 17 Nov 2015 19:17:25 +0800 Message-Id: <1447759048-25772-5-git-send-email-stefanha@redhat.com> In-Reply-To: <1447759048-25772-1-git-send-email-stefanha@redhat.com> References: <1447759048-25772-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL for-2.5 4/7] disas/arm: avoid clang shifting negative signed warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Stefan Hajnoczi clang 3.7.0 on x86_64 warns about the following: disas/arm.c:1782:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value] imm |= (-1 << 7); ~~ ^ Note that this patch preserves the tab indent in this source file because the surrounding code still uses tabs. Signed-off-by: Stefan Hajnoczi --- disas/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/arm.c b/disas/arm.c index 6165246..7a7354b 100644 --- a/disas/arm.c +++ b/disas/arm.c @@ -1779,7 +1779,7 @@ print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, long given, /* Is ``imm'' a negative number? */ if (imm & 0x40) - imm |= (-1 << 7); + imm |= (~0u << 7); func (stream, "%d", imm); } -- 2.5.0