Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 7/7] gdbserver/mem-break.c: Add cast
Date: Wed, 28 Oct 2015 18:24:00 -0000	[thread overview]
Message-ID: <1446044362-8655-8-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1446044362-8655-1-git-send-email-palves@redhat.com>

... for C++.

Fixes:

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

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

	* mem-break.c (Z_packet_to_bkpt_type): Add cast.
---
 gdb/gdbserver/mem-break.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c
index 656402a..c808a84 100644
--- a/gdb/gdbserver/mem-break.c
+++ b/gdb/gdbserver/mem-break.c
@@ -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.  */
-- 
1.9.3


  parent reply	other threads:[~2015-10-28 15:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 16:48 [PATCH 0/7] C++ patches Pedro Alves
2015-10-28 16:55 ` [PATCH 1/7] compile: Rename struct type_map_instance::gcc_type field Pedro Alves
2015-10-28 17:05 ` [PATCH 6/7] gdbserver/tracepoint: Add casts out of tpoint->handle Pedro Alves
2015-10-28 17:10 ` [PATCH 3/7] gdbserver/Linux: Introduce NULL_REGSET Pedro Alves
2015-10-28 17:20 ` [PATCH 4/7] gdbserver: btrace enums Pedro Alves
2015-10-28 18:46   ` Metzger, Markus T
2015-10-29 14:42     ` Pedro Alves
2015-10-28 17:44 ` [PATCH 5/7] gdbserver: enum gdb_signal casts Pedro Alves
2015-10-28 17:57 ` [PATCH 2/7] Add cast to exception_none Pedro Alves
2015-10-28 18:24 ` Pedro Alves [this message]
2015-10-29 15:32 ` [PATCH 0/7] C++ patches Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446044362-8655-8-git-send-email-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox