aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/event-loop.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-07-10 19:47:17 +0100
committerPedro Alves <palves@redhat.com>2015-07-10 19:47:17 +0100
commit58c1b36c673c88f13fe0cf3844fef643c35e8318 (patch)
tree72e2b98afafebacc327bc2cdc1b54b88f8eb6270 /gdb/gdbserver/event-loop.c
parent813dabb9f0413c3391035300e9af083513ce83fb (diff)
downloadgdb-58c1b36c673c88f13fe0cf3844fef643c35e8318.zip
gdb-58c1b36c673c88f13fe0cf3844fef643c35e8318.tar.gz
gdb-58c1b36c673c88f13fe0cf3844fef643c35e8318.tar.bz2
gdbserver/event-loop.c: type mismatch
Building with C++ catches a buglet here: ../../../src/gdb/gdbserver/event-loop.c:205:19: warning: invalid conversion from ‘gdb_client_data {aka void*}’ to ‘void**’ [-fpermissive] event_ptr->data = data; ^ This works in practice because gdb_client_data is a pointer already (hence in C we get an implicit conversion), and nothing deferences the pointer. It's passed from client at event registration/creation time, only to pass straight back to client callback. Well, that and nothing in gdbserver uses the event data anyway. gdb/gdbserver/ChangeLog: 2015-07-10 Pedro Alves <palves@redhat.com> * event-loop.c (struct callback_event) <data>: Change type to gdb_client_data instance instead of gdb_client_data pointer. (append_callback_event): Adjust.
Diffstat (limited to 'gdb/gdbserver/event-loop.c')
-rw-r--r--gdb/gdbserver/event-loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbserver/event-loop.c b/gdb/gdbserver/event-loop.c
index 08a503f..d1825ae 100644
--- a/gdb/gdbserver/event-loop.c
+++ b/gdb/gdbserver/event-loop.c
@@ -130,7 +130,7 @@ struct callback_event
{
int id;
callback_handler_func *proc;
- gdb_client_data *data;
+ gdb_client_data data;
struct callback_event *next;
};
@@ -249,7 +249,7 @@ process_callback (void)
if (event_ptr != NULL)
{
callback_handler_func *proc = event_ptr->proc;
- gdb_client_data *data = event_ptr->data;
+ gdb_client_data data = event_ptr->data;
/* Remove the event before calling PROC,
more events may get added by PROC. */