[PATCH] converted irix-core.c to ISO C

Joel Brobecker brobecker@adacore.com
Tue Mar 29 13:23:00 GMT 2005


> > Should the "(bfd *);" part be joined with the previous line if the entire
> > declaration fits in one line?
> 
> I don't think it matters.  Hmm, most of those prototypes can be deleted,
> since you only need forward declarations now.

How does the attached patch look? It compiles without warnings on
mips-irix, and I made sure that are not ifdef'ed function that I might
have missed.

2005-03-28  Joel Brobecker  <brobecker@gnat.com>

        * irix-core.c: Remove some unnecessary prototypes.

Is there a difference between forward declarations and prototypes?
All the litterature I've read (which is not authoritative) say they
are the same thing. In my case, I wonder if I should put the parameter
names in the forward declaration.

Thanks,
-- 
Joel
-------------- next part --------------
Index: irix-core.c
===================================================================
RCS file: /cvs/src/src/bfd/irix-core.c,v
retrieving revision 1.14
diff -u -p -r1.14 irix-core.c
--- irix-core.c	29 Mar 2005 04:48:45 -0000	1.14
+++ irix-core.c	29 Mar 2005 06:35:20 -0000
@@ -43,22 +43,9 @@ struct sgi_core_struct
 
 static asection *make_bfd_asection
   (bfd *, const char *, flagword, bfd_size_type, bfd_vma, file_ptr);
-static const bfd_target *irix_core_core_file_p
-  (bfd *);
-static char *irix_core_core_file_failing_command
-  (bfd *);
-static int irix_core_core_file_failing_signal
-  (bfd *);
-static bfd_boolean irix_core_core_file_matches_executable_p
-  (bfd *, bfd *);
-static void swap_abort
-  (void);
 #ifdef CORE_MAGIC64
-static int do_sections64
-  (bfd *, struct coreout *);
+static int do_sections64 (bfd *, struct coreout *);
 #endif
-static int do_sections
-  (bfd *, struct coreout *);
 
 /* Helper function for irix_core_core_file_p:
    32-bit and 64-bit versions.  */


More information about the Binutils mailing list