From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Hilfinger To: gdb-patches@sources.redhat.com Subject: RFC: Killing some warnings Date: Sun, 11 Feb 2001 00:00:00 -0000 Message-id: <20010211075957.3E9F434D80@nile.gnat.com> X-SW-Source: 2001-02/msg00170.html 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 * 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; } 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; } static int find_active_thread (void);