summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Hajnoczi2015-11-10 16:57:35 +0100
committerStefan Hajnoczi2015-11-17 11:35:56 +0100
commit02460c3b4287776062715b95c59cd8829015615d (patch)
tree4c38689374fab5b3ad2e2201e53d36066dc73866
parenttpm: avoid clang shifting negative signed warning (diff)
downloadqemu-02460c3b4287776062715b95c59cd8829015615d.tar.gz
qemu-02460c3b4287776062715b95c59cd8829015615d.tar.xz
qemu-02460c3b4287776062715b95c59cd8829015615d.zip
disas/arm: avoid clang shifting negative signed warning
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 <stefanha@redhat.com>
-rw-r--r--disas/arm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disas/arm.c b/disas/arm.c
index 6165246539..7a7354b76a 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);
}