]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Replace some K&R function definitions with ansi-C definitions.
authorChih-Hung Hsieh <chh@google.com>
Fri, 4 Sep 2015 19:04:11 +0000 (12:04 -0700)
committerMark Wielaard <mjw@redhat.com>
Mon, 7 Sep 2015 20:04:21 +0000 (22:04 +0200)
Signed-off-by: Chih-Hung Hsieh <chh@google.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
23 files changed:
backends/ChangeLog
backends/aarch64_init.c
backends/alpha_init.c
backends/arm_init.c
backends/i386_init.c
backends/ia64_init.c
backends/ppc64_init.c
backends/ppc_init.c
backends/s390_init.c
backends/sh_init.c
backends/sparc_init.c
backends/tilegx_init.c
backends/x86_64_init.c
libasm/ChangeLog
libasm/asm_addint8.c
libasm/asm_adduint8.c
libasm/asm_begin.c
libdw/ChangeLog
libdw/dwarf_next_cfi.c
libdw/libdw_findcu.c
libebl/ChangeLog
libebl/eblopenbackend.c
libebl/eblstother.c

index 4accedcb389deb49990c9e9d6525153389f2bdd8..2059d8622c30442a43be9a3d3acf067aa34d4244 100644 (file)
@@ -1,3 +1,19 @@
+2015-09-04  Chih-Hung Hsieh  <chh@google.com>
+
+       * aarch64_init.c (aarch64_init): Replace K&R function definition
+       with ansi-C definitions.
+       * alpha_init.c (alpha_init): Likewise.
+       * arm_init.c (arm_init): Likewise.
+       * i386_init.c (i386_init): Likewise.
+       * ia64_init.c (ia64_init): Likewise.
+       * ppc64_init.c (ppc64_init): Likewise.
+       * ppc_init.c (ppc_init): Likewise.
+       * s390_init.c (s390_init): Likewise.
+       * sh_init.c (sh_init): Likewise.
+       * sparc_init.c (sparc_init): Likewise.
+       * tilegx_init.c (tilegx_init): Likewise.
+       * x86_64_init.c (x86_64_init): Likewise.
+
 2015-09-03  Mark Wielaard  <mjw@redhat.com>
 
        * sparc_regs.c (sparc_register_info): Use ebl->class not ebl->machine.
index b0fd17a7a0b373a55cfe4d46e34199e7151d28af..6395f1171526e07106a15e2d68ddfc4529f0fafa 100644 (file)
 
 
 const char *
-aarch64_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+aarch64_init (Elf *elf __attribute__ ((unused)),
+             GElf_Half machine __attribute__ ((unused)),
+             Ebl *eh,
+             size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index a3307d83631e4d3f1b59486e84299790d5fd51f2..25c5b32f4bb3c095953c835c9a46bcd553b7fbb3 100644 (file)
 
 
 const char *
-alpha_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+alpha_init (Elf *elf __attribute__ ((unused)),
+           GElf_Half machine __attribute__ ((unused)),
+           Ebl *eh,
+           size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index f3e5f0a9242e4ffaca27b1811eed3b4e0144a075..caadac65c9d176cd10e105c4a255d4f02ebfb9bd 100644 (file)
 
 
 const char *
-arm_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+arm_init (Elf *elf __attribute__ ((unused)),
+         GElf_Half machine __attribute__ ((unused)),
+         Ebl *eh,
+         size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 1e0b4863289c6e1485a96e05c62d8efb12aecd03..515d5ac0aeb14f614983f5b02d982db7d580986d 100644 (file)
 #include "common-reloc.c"
 
 const char *
-i386_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+i386_init (Elf *elf __attribute__ ((unused)),
+          GElf_Half machine __attribute__ ((unused)),
+          Ebl *eh,
+          size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 91da748da2dd14df47f614b8528abfe2cca1f181..7241d7b8247998a55e3e7620b6b2fde4ad5ab977 100644 (file)
 #include "common-reloc.c"
 
 const char *
-ia64_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+ia64_init (Elf *elf __attribute__ ((unused)),
+          GElf_Half machine __attribute__ ((unused)),
+          Ebl *eh,
+          size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 56e1828efb56e3f131ec047385c3c04394aab1fd..2ba823271861ba927b087a699791f98ade05fec7 100644 (file)
 
 
 const char *
-ppc64_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+ppc64_init (Elf *elf __attribute__ ((unused)),
+           GElf_Half machine __attribute__ ((unused)),
+           Ebl *eh,
+           size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index ad92765c94a4ae241fef955c035672b28a9ab170..c3e3ca360745616f471636160245cdbc958fe698 100644 (file)
 
 
 const char *
-ppc_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+ppc_init (Elf *elf __attribute__ ((unused)),
+         GElf_Half machine __attribute__ ((unused)),
+         Ebl *eh,
+         size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 26b20b4942028af2c4cc2d0daffad49f973d703e..ba8df45d6d24819fced0e31a9d9843c91915b161 100644 (file)
@@ -41,11 +41,10 @@ extern __typeof (s390_core_note) s390x_core_note;
 
 
 const char *
-s390_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+s390_init (Elf *elf __attribute__ ((unused)),
+          GElf_Half machine __attribute__ ((unused)),
+          Ebl *eh,
+          size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 90ddcb2c2a300ee46ce1715cfc84c6be7e3055a1..5526aca1ae15c03ef74cc368afb6c1aa2ba920f4 100644 (file)
 
 
 const char *
-sh_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+sh_init (Elf *elf __attribute__ ((unused)),
+        GElf_Half machine __attribute__ ((unused)),
+        Ebl *eh,
+        size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 7d2299814842408e368936c00925961a24915007..18d7349495dabd7431aa78562ae173089fbb72a7 100644 (file)
 extern __typeof (EBLHOOK (core_note)) sparc64_core_note attribute_hidden;
 
 const char *
-sparc_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+sparc_init (Elf *elf __attribute__ ((unused)),
+           GElf_Half machine __attribute__ ((unused)),
+           Ebl *eh,
+           size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 858798bf6a2870ba65066ee2440d9c2b5a22e37e..162ed3624b87397c1d0c9a7b0dd721c62b3027a0 100644 (file)
 #include "common-reloc.c"
 
 const char *
-tilegx_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+tilegx_init (Elf *elf __attribute__ ((unused)),
+            GElf_Half machine __attribute__ ((unused)),
+            Ebl *eh,
+            size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 273eabbf2ec180152348d411e48d3fd921adb04c..cfd0158ca4ebe7d733e2ee6f49a5cef8f3a4056e 100644 (file)
 extern __typeof (EBLHOOK (core_note)) x32_core_note attribute_hidden;
 
 const char *
-x86_64_init (elf, machine, eh, ehlen)
-     Elf *elf __attribute__ ((unused));
-     GElf_Half machine __attribute__ ((unused));
-     Ebl *eh;
-     size_t ehlen;
+x86_64_init (Elf *elf __attribute__ ((unused)),
+            GElf_Half machine __attribute__ ((unused)),
+            Ebl *eh,
+            size_t ehlen)
 {
   /* Check whether the Elf_BH object has a sufficent size.  */
   if (ehlen < sizeof (Ebl))
index 9b25af99918b25b22c305d72c5677548331822fc..91338d09a52378caa26d7a48c4b4e4426914f4b7 100644 (file)
@@ -1,3 +1,10 @@
+2015-09-04  Chih-Hung Hsieh  <chh@google.com>
+
+       * asm_addint8.c (FCT): Replace K&R function definition
+       with ansi-C definitions.
+       * asm_adduint8.c (UFCT): Likewise.
+       * asm_begin.c (asm_begin): Likewise.
+
 2014-12-18  Ulrich Drepper  <drepper@gmail.com>
 
        * Makefile.am: Suppress output of textrel_check command.
index ec05b8da9216c5b7c3371180ff26de94489bcc6f..bb7d40f228f651acfaeb1bda74cc8c44c5f59fca 100644 (file)
@@ -51,9 +51,7 @@
 
 
 int
-FCT(SIZE) (asmscn, num)
-     AsmScn_t *asmscn;
-     TYPE(SIZE) num;
+FCT(SIZE) (AsmScn_t *asmscn, TYPE(SIZE) num)
 {
   if (asmscn == NULL)
     return -1;
index 30641b841d3e1e84c74d3f147281f67277a58ce2..18b67ddfed1354eab3c6e5c9fa146518d40d4940 100644 (file)
@@ -48,9 +48,7 @@
 
 
 int
-UFCT(SIZE) (asmscn, num)
-     AsmScn_t *asmscn;
-     UTYPE(SIZE) num;
+UFCT(SIZE) (AsmScn_t *asmscn, UTYPE(SIZE) num)
 {
   return INTUSE(FCT(SIZE)) (asmscn, (TYPE(SIZE)) num);
 }
index 48842d3c608b26d69e0590efbdc83d902a240f84..ff4d94c23c9381178025f7b740c182334722d0c4 100644 (file)
@@ -127,10 +127,7 @@ prepare_binary_output (AsmCtx_t *result, Ebl *ebl)
 
 
 AsmCtx_t *
-asm_begin (fname, ebl, textp)
-     const char *fname;
-     Ebl *ebl;
-     bool textp;
+asm_begin (const char *fname, Ebl *ebl, bool textp)
 {
   if (fname == NULL && ! textp)
     return NULL;
index 315ad70bbfb4d069e77ca083d7781e7c8fcb1369..63910ba75fde34c6daa27e859ef3eb0344e39b3c 100644 (file)
@@ -1,3 +1,9 @@
+2015-09-04  Chih-Hung Hsieh  <chh@google.com>
+
+       * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function
+       definition with ansi-C definitions.
+       (__libdw_findcu): Likewise.
+
 2015-08-25  Mark Wielaard  <mjw@redhat.com>
 
        * dwarf.h: Add DW_LANG_Haskell.
index b5af49e3e355ec5cd3c07d9c3592743d88064e12..53fc369722e9685c04ca6f18ca683cf820b10338 100644 (file)
 
 
 int
-dwarf_next_cfi (e_ident, data, eh_frame_p, off, next_off, entry)
-     const unsigned char e_ident[];
-     Elf_Data *data;
-     bool eh_frame_p;
-     Dwarf_Off off;
-     Dwarf_Off *next_off;
-     Dwarf_CFI_Entry *entry;
+dwarf_next_cfi (const unsigned char e_ident[],
+               Elf_Data *data,
+               bool eh_frame_p,
+               Dwarf_Off off,
+               Dwarf_Off *next_off,
+               Dwarf_CFI_Entry *entry)
 {
   /* Dummy struct for memory-access.h macros.  */
   BYTE_ORDER_DUMMY (dw, e_ident);
index d8da2e38af41ac3eb59452beb8761e26d419f792..5c03843c853113e319e2ccc2d6433b03cdd1995a 100644 (file)
@@ -63,9 +63,7 @@ findcu_cb (const void *arg1, const void *arg2)
 
 struct Dwarf_CU *
 internal_function
-__libdw_intern_next_unit (dbg, debug_types)
-     Dwarf *dbg;
-     bool debug_types;
+__libdw_intern_next_unit (Dwarf *dbg, bool debug_types)
 {
   Dwarf_Off *const offsetp
     = debug_types ? &dbg->next_tu_offset : &dbg->next_cu_offset;
@@ -135,10 +133,7 @@ __libdw_intern_next_unit (dbg, debug_types)
 }
 
 struct Dwarf_CU *
-__libdw_findcu (dbg, start, debug_types)
-     Dwarf *dbg;
-     Dwarf_Off start;
-     bool debug_types;
+__libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool debug_types)
 {
   void **tree = debug_types ? &dbg->tu_tree : &dbg->cu_tree;
   Dwarf_Off *next_offset
index 4305cf6dc16365f89ab03705db6e99297d36f19a..60ae566d1c891e5ad5ed83b36a9f7a194a95b43b 100644 (file)
@@ -1,3 +1,9 @@
+2015-09-04  Chih-Hung Hsieh  <chh@google.com>
+
+       * eblopenbackend.c (ebl_openbackend_machine): Replace K&R function
+       definition with ansi-C definitions.
+       * eblstother.c (ebl_check_st_other_bits): Likewise.
+
 2015-06-12  Mark Wielaard  <mjw@redhat.com>
 
        * eblcheckreloctargettype.c (ebl_check_reloc_target_type): Allow
index 2766e7b069b993d14d27ff59c89d2586d17b256d..02b24d3f2012971871dc3af56bf5d4a99a23f25f 100644 (file)
@@ -418,8 +418,7 @@ ebl_openbackend (elf)
 
 /* Find backend without underlying ELF file.  */
 Ebl *
-ebl_openbackend_machine (machine)
-     GElf_Half machine;
+ebl_openbackend_machine (GElf_Half machine)
 {
   return openbackend (NULL, NULL, machine);
 }
index ccbf138b4e573eaf7941cd4b76eed1f98f8cf496..273f6fc16fc4b03a3aac834ae90aa85fa63f2f8a 100644 (file)
@@ -34,9 +34,7 @@
 
 
 bool
-ebl_check_st_other_bits (ebl, st_other)
-     Ebl *ebl;
-     unsigned char st_other;
+ebl_check_st_other_bits (Ebl *ebl, unsigned char st_other)
 {
   return ((st_other ^ GELF_ST_VISIBILITY (st_other)) == 0
          || ebl->check_st_other_bits (st_other ^ GELF_ST_VISIBILITY (st_other)));