[PATCH c++ 5/5] mips: Add cast for int to enum conversion

Simon Marchi
2015-10-11T04:44:32Z

This patch is taken directly from Pedro's branch.

/home/pedro/gdb/mygit/src/gdb/mips-tdep.c: In function ‘ULONGEST mips_fetch_instruction(gdbarch*, mips_isa, CORE_ADDR, int*)’:
/home/pedro/gdb/mygit/src/gdb/mips-tdep.c:1460:28: error: invalid conversion from ‘int’ to ‘target_xfer_status’ [-fpermissive]
memory_error (status, addr);

gdb/ChangeLog:

* mips-tdep.c (mips_fetch_instruction): Add cast.
---
gdb/mips-tdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 2275138..73b9221 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1456,7 +1456,7 @@ mips_fetch_instruction (struct gdbarch *gdbarch,
if (status)
{
if (statusp == NULL)
- memory_error (status, addr);
+ memory_error ((enum target_xfer_status) status, addr);
return 0;
}
return extract_unsigned_integer (buf, instlen, byte_order);
--
2.6.1