RFC: Killing some warnings

Paul Hilfinger
2001-02-11T00:00:00Z

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);