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 66db27f5303df8e5dfc294688a164f2fd97610aa..46e347daf0e452f452cb38bd68928b4c0729ee29 100644 (file)
@@ -1,3 +1,7 @@
+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.
index 656402ae7c30e019c3f6b96333b3dc80b1def50a..c808a84d751a0cdbdfa221673672904cb29e0542 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.  */