From f9fa37b32501f173a37891fb1a8f9013af38a098 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 9 Oct 2015 10:12:21 -0400 Subject: [PATCH] arm-linux-tdep: Add explicit cast for int to gdb_syscall conversion This patch is taken from Pedro's branch. gdb/ChangeLog: * arm-linux-tdep.c (arm_canonicalize_syscall): Add enum gdb_syscall casts. --- gdb/ChangeLog | 5 +++++ gdb/arm-linux-tdep.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1a440290275..5085c832fb9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-10-09 Simon Marchi + + * arm-linux-tdep.c (arm_canonicalize_syscall): Add + enum gdb_syscall casts. + 2015-10-09 Simon Marchi * aarch64-tdep.c (stack_item_t): Change type of data to gdb_byte*. diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index b7c5b99f62a..dc0a8a9dbc4 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -1265,11 +1265,11 @@ arm_canonicalize_syscall (int syscall) enum { sys_process_vm_writev = 377 }; if (syscall <= gdb_sys_sched_getaffinity) - return syscall; + return (enum gdb_syscall) syscall; else if (syscall >= 243 && syscall <= 247) - return syscall + 2; + return (enum gdb_syscall) (syscall + 2); else if (syscall >= 248 && syscall <= 253) - return syscall + 4; + return (enum gdb_syscall) (syscall + 4); return gdb_sys_no_syscall; } -- 2.30.2