From: Paul Hilfinger <hilfingr@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: RFC: Killing some warnings
Date: Sun, 11 Feb 2001 00:00:00 -0000 [thread overview]
Message-ID: <20010211075957.3E9F434D80@nile.gnat.com> (raw)
While I was mucking around with hpux-thread.c, I happened to notice that
it contains an instance of make_cleanup that does not conform to the
guidelines given in Cagney's comment in defs.h. Doesn't happen to cause
any problems here, except for warnings, but I don't trust warnings. With
this change, there will be no warnings unless the size of void* or int
changes, at which point there SHOULD be one.
Paul Hilfinger
Ada Core Technologies
2001-02-11 Paul Hilfinger <hilfingr@nile.gnat.com>
* hpux-thread.c (save_inferior_pid): Change call to make_cleanup
to make arguments conform.
(restore_inferior_pid): Change signature to that expected by
make_cleanup.
Index: gdb/hpux-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/hpux-thread.c,v
retrieving revision 1.5
diff -c -3 -p -r1.5 hpux-thread.c
*** hpux-thread.c 2000/09/05 22:46:57 1.5
--- hpux-thread.c 2001/02/10 23:28:12
*************** static CORE_ADDR P_cma__g_current_thread
*** 63,69 ****
static struct cleanup *save_inferior_pid (void);
! static void restore_inferior_pid (int pid);
static void hpux_thread_resume (int pid, int step, enum target_signal signo);
--- 63,69 ----
static struct cleanup *save_inferior_pid (void);
! static void restore_inferior_pid (void* pid);
static void hpux_thread_resume (int pid, int step, enum target_signal signo);
*************** static struct target_ops hpux_thread_ops
*** 81,87 ****
SYNOPSIS
struct cleanup *save_inferior_pid ()
! void restore_inferior_pid (int pid)
DESCRIPTION
--- 81,87 ----
SYNOPSIS
struct cleanup *save_inferior_pid ()
! void restore_inferior_pid (void* pid)
DESCRIPTION
*************** static struct target_ops hpux_thread_ops
*** 102,114 ****
static struct cleanup *
save_inferior_pid (void)
{
! return make_cleanup (restore_inferior_pid, inferior_pid);
}
static void
! restore_inferior_pid (int pid)
{
! inferior_pid = pid;
}
\f
static int find_active_thread (void);
--- 102,114 ----
static struct cleanup *
save_inferior_pid (void)
{
! return make_cleanup (restore_inferior_pid, (void*) inferior_pid);
}
static void
! restore_inferior_pid (void* pid)
{
! inferior_pid = (int) pid;
}
\f
static int find_active_thread (void);
next reply other threads:[~2001-02-11 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-11 0:00 Paul Hilfinger [this message]
2001-02-12 14:55 ` Kevin Buettner
2001-02-13 14:28 ` Andrew Cagney
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=20010211075957.3E9F434D80@nile.gnat.com \
--to=hilfingr@gnat.com \
--cc=gdb-patches@sources.redhat.com \
/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