[PATCH] Remove unnecessary function prototypes.

John Baldwin jhb@FreeBSD.org
Sat Sep 9 15:54:00 GMT 2017


On 9/7/17 4:53 PM, Simon Marchi wrote:
> On 2017-09-07 09:53 PM, John Baldwin wrote:
>> These prototypes were required when compiling GDB as C but are not
>> required for C++.
> 
> Thanks a lot for doing this!  This patch is ok.  Just to understand your
> intentions, do you plan to remove the remaining ones as well later?

No, just insufficient grepping on my part.  I'll send a V2 in a bit that
removes all the remaining cases found by your pattern.

> Before patch:
> 
> $ egrep "(void|initialize_file_ftype) _initialize_" */*.c *.c  | wc -l
> 346
> 
> After patch:
> 
> $ egrep "(void|initialize_file_ftype) _initialize_" */*.c *.c  | wc -l
> 68
> 
> In the end, I think we'll be able to move the initialize_file_ftype typedef
> to the generated init.c file, since it won't be used anywhere else.

Yes, the only remaining reference now is in defs.h outside of init.c.

-- 
John Baldwin



More information about the Gdb-patches mailing list