From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Buettner To: Paul Hilfinger , gdb-patches@sources.redhat.com Subject: Re: RFC: Killing some warnings Date: Mon, 12 Feb 2001 14:55:00 -0000 Message-id: <1010212225533.ZM10647@ocotillo.lan> References: <20010211075957.3E9F434D80@nile.gnat.com> X-SW-Source: 2001-02/msg00177.html On Feb 11, 2:59am, Paul Hilfinger wrote: > * 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. [...] > *************** 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); Personally, I'd prefer to see these changed to avoid the casts to (void *) and (int). See the implementation in lin-thread.c (and also elsewhere) for an example. (If we ever get around to merging my pid/tid/lwp megapatch, these are cleaned up everywhere. I.e, there is one implementation that all files which need to do this sort of thing use.) Kevin