From: Nick Clifton Date: Thu, 9 Jan 2020 14:32:49 +0000 (+0000) Subject: Fix the cast used to prevent compile time warning about an always false test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bce58db4fb1112529a54387c7fdaa1042859f5fb;p=binutils-gdb.git Fix the cast used to prevent compile time warning about an always false test. PR 25224 * z80-dis.c (ld_ii_ii): Use correct cast. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 396549b8503..eb67b55db7b 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2020-01-09 Nick Clifton + + PR 25224 + * z80-dis.c (ld_ii_ii): Use correct cast. + 2020-01-03 Sergey Belyashov PR 25224 diff --git a/opcodes/z80-dis.c b/opcodes/z80-dis.c index 8dc75987123..b6f0606a17a 100644 --- a/opcodes/z80-dis.c +++ b/opcodes/z80-dis.c @@ -603,7 +603,7 @@ ld_ii_ii (struct buffer *buf, disassemble_info * info, const char *txt) int p; static const char *ii[2] = { "ix", "iy" }; - p = (buf->data[buf->n_fetch - 2] == (char) 0xdd) ? 0 : 1; + p = (buf->data[buf->n_fetch - 2] == (signed char) 0xdd) ? 0 : 1; c = buf->data[buf->n_fetch - 1]; if ((c & 0x07) != 0x07) p = 1 - p; /* 0 -> 1, 1 -> 0 */