This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix compile time warning building arm-dis.c
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 16 Dec 2016 10:59:47 -0000
- Subject: [binutils-gdb] Fix compile time warning building arm-dis.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=db7b55faa1a11e632ddf57505c9bb64bc783471a
commit db7b55faa1a11e632ddf57505c9bb64bc783471a
Author: Nick Clifton <nickc@redhat.com>
Date: Fri Dec 16 10:59:36 2016 +0000
Fix compile time warning building arm-dis.c
Diff:
---
opcodes/ChangeLog | 5 +++++
opcodes/arm-dis.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index c8a1b7e..d247bac 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-16 Nick Clifton <nickc@redhat.com>
+
+ * arm-dis.c (print_insn_thumb32): Fix compile time warning
+ computing value_in_comment.
+
2016-12-14 Maciej W. Rozycki <macro@imgtec.com>
* mips-dis.c (mips_convert_abiflags_ases): New function.
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 791d124..372c11e 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -5759,7 +5759,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
if (off || !U)
{
func (stream, ", #%c%u", U ? '+' : '-', off * 4);
- value_in_comment = off * 4 * U ? 1 : -1;
+ value_in_comment = (off && U) ? 1 : -1;
}
func (stream, "]");
if (W)
@@ -5771,7 +5771,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
if (W)
{
func (stream, "#%c%u", U ? '+' : '-', off * 4);
- value_in_comment = off * 4 * U ? 1 : -1;
+ value_in_comment = (off && U) ? 1 : -1;
}
else
{