This is the mail archive of the
mailing list for the GDB project.
FYI: fix for PR 7196
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 18 Nov 2011 08:38:36 -0700
- Subject: FYI: fix for PR 7196
I'm checking this in.
I happened across PR 7196, concerning bad casts to catch_errors_ftype.
I looked, and there was just a single such cast in the tree.
Tested by rebuilding on x86-64 F15.
2011-11-18 Tom Tromey <firstname.lastname@example.org>
* remote.c (putpkt_for_catch_errors): New function.
(remote_kill): Use it.
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.469
diff -u -r1.469 remote.c
--- remote.c 14 Nov 2011 20:07:20 -0000 1.469
+++ remote.c 18 Nov 2011 15:36:59 -0000
@@ -7369,12 +7369,20 @@
+/* A helper function that just calls putpkt; for type correctness. */
+putpkt_for_catch_errors (void *arg)
+ return putpkt (arg);
remote_kill (struct target_ops *ops)
/* Use catch_errors so the user can quit from gdb even when we
aren't on speaking terms with the remote system. */
- catch_errors ((catch_errors_ftype *) putpkt, "k", "", RETURN_MASK_ERROR);
+ catch_errors (putpkt_for_catch_errors, "k", "", RETURN_MASK_ERROR);
/* Don't wait for it to die. I'm not really sure it matters whether
we do or not. For the existing stubs, kill is a noop. */