Fix compile time warning building arm-dis.c
authorNick Clifton <nickc@redhat.com>
Fri, 16 Dec 2016 10:59:36 +0000 (10:59 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 16 Dec 2016 10:59:36 +0000 (10:59 +0000)
opcodes/ChangeLog
opcodes/arm-dis.c

index c8a1b7e..d247bac 100644 (file)
@@ -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.
index 791d124..372c11e 100644 (file)
@@ -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
                        {