Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFC: Killing some warnings
@ 2001-02-11  0:00 Paul Hilfinger
  2001-02-12 14:55 ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Hilfinger @ 2001-02-11  0:00 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-02-13 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-11  0:00 RFC: Killing some warnings Paul Hilfinger
2001-02-12 14:55 ` Kevin Buettner
2001-02-13 14:28   ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox