[c++,07/12] Change return type of raw_bkpt_type_to_arm_hwbp_type

Message ID 1446560804-18858-7-git-send-email-simon.marchi@ericsson.com
State Committed
Headers

Commit Message

Simon Marchi Nov. 3, 2015, 2:26 p.m. UTC
  From: Simon Marchi <simon.marchi@polymtl.ca>

Fixes:

/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c: In function ‘int arm_linux_hw_point_initialize(raw_bkpt_type, CORE_ADDR, int, arm_linux_hw_breakpoint*)’:
/home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:459:55: error: invalid conversion from ‘int’ to ‘arm_hwbp_type’ [-fpermissive]
   hwbp_type = raw_bkpt_type_to_arm_hwbp_type (raw_type);
                                                       ^

gdb/gdbserver/ChangeLog:

		* linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
		Change return type to arm_hwbp_type.
---
 gdb/gdbserver/linux-arm-low.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Pedro Alves Nov. 3, 2015, 4:16 p.m. UTC | #1
On 11/03/2015 02:26 PM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@polymtl.ca>
> 
> Fixes:
> 
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c: In function ‘int arm_linux_hw_point_initialize(raw_bkpt_type, CORE_ADDR, int, arm_linux_hw_breakpoint*)’:
> /home/simark/src/binutils-gdb/gdb/gdbserver/linux-arm-low.c:459:55: error: invalid conversion from ‘int’ to ‘arm_hwbp_type’ [-fpermissive]
>    hwbp_type = raw_bkpt_type_to_arm_hwbp_type (raw_type);
>                                                        ^
> 
> gdb/gdbserver/ChangeLog:
> 
> 		* linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
> 		Change return type to arm_hwbp_type.

OK.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index ae659dd..dda37cb 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -426,7 +426,7 @@  arm_linux_hw_breakpoint_equal (const struct arm_linux_hw_breakpoint *p1,
 
 /* Convert a raw breakpoint type to an enum arm_hwbp_type.  */
 
-static int
+static arm_hwbp_type
 raw_bkpt_type_to_arm_hwbp_type (enum raw_bkpt_type raw_type)
 {
   switch (raw_type)