gdbserver/mem-break.c: Add cast
authorPedro Alves <palves@redhat.com>
Thu, 29 Oct 2015 12:55:02 +0000 (12:55 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 29 Oct 2015 12:56:27 +0000 (12:56 +0000)
... for C++.

Fixes:

 gdb/gdbserver/mem-break.c:204:28: error: invalid conversion from 'int' to 'bkpt_type' [-fpermissive]

gdb/gdbserver/ChangeLog:
2015-10-29  Pedro Alves  <palves@redhat.com>

* mem-break.c (Z_packet_to_bkpt_type): Add cast.

gdb/gdbserver/ChangeLog
gdb/gdbserver/mem-break.c

index 66db27f..46e347d 100644 (file)
@@ -1,5 +1,9 @@
 2015-10-29  Pedro Alves  <palves@redhat.com>
 
+       * mem-break.c (Z_packet_to_bkpt_type): Add cast.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
        * tracepoint.c (clear_installed_tracepoints): Add casts.
 
 2015-10-29  Pedro Alves  <palves@redhat.com>
index 656402a..c808a84 100644 (file)
@@ -241,7 +241,7 @@ Z_packet_to_bkpt_type (char z_type)
 {
   gdb_assert ('0' <= z_type && z_type <= '4');
 
-  return gdb_breakpoint_Z0 + (z_type - '0');
+  return (enum bkpt_type) (gdb_breakpoint_Z0 + (z_type - '0'));
 }
 
 /* See mem-break.h.  */