Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [cosmetic-patch] missing declaration in monitor.c
@ 2006-07-17 11:31 Denis PILAT
  2006-07-17 12:32 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Denis PILAT @ 2006-07-17 11:31 UTC (permalink / raw)
  To: gdb-patches

monitor_insert_breakpoint and monitor_remove_breakpoint used to be 
declared with other static function.

-- 
Denis

Index: monitor.c
===================================================================
--- monitor.c   (revision 486)
+++ monitor.c   (working copy)
@@ -85,6 +85,8 @@ static int monitor_xfer_memory (CORE_ADD
                                struct mem_attrib *attrib,
                                struct target_ops *target);
 static void monitor_files_info (struct target_ops *ops);
+static int monitor_insert_breakpoint (struct bp_target_info *bp_tgt);
+static int monitor_remove_breakpoint (struct bp_target_info *bp_tgt);
 static void monitor_kill (void);
 static void monitor_load (char *file, int from_tty);
 static void monitor_mourn_inferior (void);



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

* Re: [cosmetic-patch] missing declaration in monitor.c
  2006-07-17 11:31 [cosmetic-patch] missing declaration in monitor.c Denis PILAT
@ 2006-07-17 12:32 ` Daniel Jacobowitz
  2006-07-17 12:50   ` Denis PILAT
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-07-17 12:32 UTC (permalink / raw)
  To: Denis PILAT; +Cc: gdb-patches

On Mon, Jul 17, 2006 at 01:31:39PM +0200, Denis PILAT wrote:
> monitor_insert_breakpoint and monitor_remove_breakpoint used to be 
> declared with other static function.

Yes, I deliberately removed the prototypes instead of changing them.
Did you need them back for a reason?  There's no advantage in modern
C to prototyping a static function if it is not used before it is
defined.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [cosmetic-patch] missing declaration in monitor.c
  2006-07-17 12:32 ` Daniel Jacobowitz
@ 2006-07-17 12:50   ` Denis PILAT
  2006-07-17 13:44     ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Denis PILAT @ 2006-07-17 12:50 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches


Daniel Jacobowitz wrote:

>On Mon, Jul 17, 2006 at 01:31:39PM +0200, Denis PILAT wrote:
>  
>
>>monitor_insert_breakpoint and monitor_remove_breakpoint used to be 
>>declared with other static function.
>>    
>>
>
>Yes, I deliberately removed the prototypes instead of changing them.
>Did you need them back for a reason?  There's no advantage in modern
>C to prototyping a static function if it is not used before it is
>defined.
>
>  
>
No I don't need them.
While reading the code I found that they were missing because all other 
static function are declared.
I'm wondering why you remove only these 2 one ? Most of static functions 
are not used before beeing defined.



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

* Re: [cosmetic-patch] missing declaration in monitor.c
  2006-07-17 12:50   ` Denis PILAT
@ 2006-07-17 13:44     ` Daniel Jacobowitz
  2006-07-17 18:01       ` Mark Kettenis
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-07-17 13:44 UTC (permalink / raw)
  To: Denis PILAT; +Cc: gdb-patches

On Mon, Jul 17, 2006 at 02:50:05PM +0200, Denis PILAT wrote:
> No I don't need them.
> While reading the code I found that they were missing because all other 
> static function are declared.
> I'm wondering why you remove only these 2 one ? Most of static functions 
> are not used before beeing defined.

I removed those two because I was changing them - the old ones were
wrong.  It's a bit of work to make sure that a prototype isn't
necessary.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [cosmetic-patch] missing declaration in monitor.c
  2006-07-17 13:44     ` Daniel Jacobowitz
@ 2006-07-17 18:01       ` Mark Kettenis
       [not found]         ` <44BC9AFF.9020906@st.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2006-07-17 18:01 UTC (permalink / raw)
  To: drow; +Cc: denis.pilat, gdb-patches

> Date: Mon, 17 Jul 2006 09:43:58 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> On Mon, Jul 17, 2006 at 02:50:05PM +0200, Denis PILAT wrote:
> > No I don't need them.
> > While reading the code I found that they were missing because all other 
> > static function are declared.
> > I'm wondering why you remove only these 2 one ? Most of static functions 
> > are not used before beeing defined.
> 
> I removed those two because I was changing them - the old ones were
> wrong.  It's a bit of work to make sure that a prototype isn't
> necessary.

But you're encouraged to remove redundant prototypes if you happen to
see them ;-).

Mark


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

* Re: [cosmetic-patch] missing declaration in monitor.c
       [not found]         ` <44BC9AFF.9020906@st.com>
@ 2006-07-18 20:46           ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-07-18 20:46 UTC (permalink / raw)
  To: Denis PILAT; +Cc: Mark Kettenis, gdb-patches

On Tue, Jul 18, 2006 at 10:25:35AM +0200, Denis PILAT wrote:
> <tt>I sent a patch to Daniel yesterday where all useless prototypes are removed.<br>
> Cf attached message.<br>

Two things: please don't use HTML mail on this list, and please try to
use a mailer which won't completely mangle patches.  It had been line
wrapped and some tabs were converted to spaces.

Anyway, the patch looks fine; thanks.  I've checked it in with this
ChangeLog entry:

2006-07-18  Denis PILAT  <denis.pilat@st.com>

        * monitor.c: Remove unused prototypes.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2006-07-18 20:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-17 11:31 [cosmetic-patch] missing declaration in monitor.c Denis PILAT
2006-07-17 12:32 ` Daniel Jacobowitz
2006-07-17 12:50   ` Denis PILAT
2006-07-17 13:44     ` Daniel Jacobowitz
2006-07-17 18:01       ` Mark Kettenis
     [not found]         ` <44BC9AFF.9020906@st.com>
2006-07-18 20:46           ` Daniel Jacobowitz

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