mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
x86: fix disassembler build after 1a3b4f90bc
In commit 1a3b4f90bc
("x86: convert two pointers to (indexing)
integers") I neglected the fact that compilers may warn about comparing
ptrdiff_t (signed long) with size_t (unsigned long) values. Since just
before we've checked that the value is positive, simply add a cast
(despite my dislike for casts).
This commit is contained in:
parent
a3b86780b6
commit
93497bf9ab
@ -300,7 +300,7 @@ fetch_code (struct disassemble_info *info, const uint8_t *until)
|
||||
if (needed <= 0)
|
||||
return true;
|
||||
|
||||
if (priv->fetched + needed <= ARRAY_SIZE (priv->the_buffer))
|
||||
if (priv->fetched + (size_t) needed <= ARRAY_SIZE (priv->the_buffer))
|
||||
status = (*info->read_memory_func) (start, fetch_end, needed, info);
|
||||
if (status != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user