summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/ChangeLog6
-rw-r--r--backends/arm_attrs.c10
-rw-r--r--backends/linux-core-note.c12
-rw-r--r--backends/ppc_attrs.c10
-rw-r--r--config/ChangeLog4
-rw-r--r--config/eu.am1
-rw-r--r--lib/ChangeLog9
-rw-r--r--lib/dynamicsizehash.c31
-rw-r--r--lib/md5.c32
-rw-r--r--lib/sha1.c23
-rw-r--r--lib/xmalloc.c12
-rw-r--r--lib/xstrdup.c5
-rw-r--r--lib/xstrndup.c6
-rw-r--r--libasm/ChangeLog4
-rw-r--r--libasm/asm_abort.c3
-rw-r--r--libasm/asm_addsleb128.c4
-rw-r--r--libasm/asm_addstrz.c5
-rw-r--r--libasm/asm_adduleb128.c4
-rw-r--r--libasm/asm_align.c8
-rw-r--r--libasm/asm_end.c6
-rw-r--r--libasm/asm_error.c6
-rw-r--r--libasm/asm_fill.c5
-rw-r--r--libasm/asm_getelf.c3
-rw-r--r--libasm/asm_newabssym.c9
-rw-r--r--libasm/asm_newcomsym.c7
-rw-r--r--libasm/asm_newscn.c7
-rw-r--r--libasm/asm_newscn_ingrp.c8
-rw-r--r--libasm/asm_newscngrp.c7
-rw-r--r--libasm/asm_newsubscn.c4
-rw-r--r--libasm/asm_newsym.c8
-rw-r--r--libasm/asm_scngrp_newsignature.c4
-rw-r--r--libdw/ChangeLog4
-rw-r--r--libdw/dwarf_abbrevhaschildren.c3
-rw-r--r--libdw/dwarf_addrdie.c5
-rw-r--r--libdw/dwarf_aggregate_size.c4
-rw-r--r--libdw/dwarf_arrayorder.c3
-rw-r--r--libdw/dwarf_attr.c5
-rw-r--r--libdw/dwarf_begin.c4
-rw-r--r--libdw/dwarf_begin_elf.c5
-rw-r--r--libdw/dwarf_bitoffset.c3
-rw-r--r--libdw/dwarf_bitsize.c3
-rw-r--r--libdw/dwarf_bytesize.c3
-rw-r--r--libdw/dwarf_cfi_addrframe.c5
-rw-r--r--libdw/dwarf_cfi_end.c3
-rw-r--r--libdw/dwarf_child.c4
-rw-r--r--libdw/dwarf_cu_die.c14
-rw-r--r--libdw/dwarf_cu_getdwarf.c3
-rw-r--r--libdw/dwarf_cuoffset.c3
-rw-r--r--libdw/dwarf_diecu.c7
-rw-r--r--libdw/dwarf_diename.c3
-rw-r--r--libdw/dwarf_dieoffset.c3
-rw-r--r--libdw/dwarf_end.c3
-rw-r--r--libdw/dwarf_entry_breakpoints.c4
-rw-r--r--libdw/dwarf_entrypc.c4
-rw-r--r--libdw/dwarf_error.c6
-rw-r--r--libdw/dwarf_formaddr.c4
-rw-r--r--libdw/dwarf_formblock.c4
-rw-r--r--libdw/dwarf_formflag.c4
-rw-r--r--libdw/dwarf_formref.c8
-rw-r--r--libdw/dwarf_formref_die.c4
-rw-r--r--libdw/dwarf_formsdata.c4
-rw-r--r--libdw/dwarf_formstring.c3
-rw-r--r--libdw/dwarf_formudata.c4
-rw-r--r--libdw/dwarf_frame_cfa.c5
-rw-r--r--libdw/dwarf_frame_info.c7
-rw-r--r--libdw/dwarf_frame_register.c8
-rw-r--r--libdw/dwarf_getabbrev.c13
-rw-r--r--libdw/dwarf_getabbrevattr.c8
-rw-r--r--libdw/dwarf_getabbrevcode.c3
-rw-r--r--libdw/dwarf_getabbrevtag.c3
-rw-r--r--libdw/dwarf_getarange_addr.c4
-rw-r--r--libdw/dwarf_getaranges.c5
-rw-r--r--libdw/dwarf_getattrcnt.c4
-rw-r--r--libdw/dwarf_getcfi.c3
-rw-r--r--libdw/dwarf_getcfi_elf.c3
-rw-r--r--libdw/dwarf_getelf.c3
-rw-r--r--libdw/dwarf_getlocation.c40
-rw-r--r--libdw/dwarf_getlocation_attr.c5
-rw-r--r--libdw/dwarf_getlocation_die.c6
-rw-r--r--libdw/dwarf_getlocation_implicit_pointer.c6
-rw-r--r--libdw/dwarf_getmacros.c7
-rw-r--r--libdw/dwarf_getpubnames.c8
-rw-r--r--libdw/dwarf_getsrcdirs.c5
-rw-r--r--libdw/dwarf_getstring.c5
-rw-r--r--libdw/dwarf_hasattr.c4
-rw-r--r--libdw/dwarf_haschildren.c3
-rw-r--r--libdw/dwarf_hasform.c4
-rw-r--r--libdw/dwarf_highpc.c4
-rw-r--r--libdw/dwarf_lowpc.c4
-rw-r--r--libdw/dwarf_nextcu.c29
-rw-r--r--libdw/dwarf_offdie.c10
-rw-r--r--libdw/dwarf_peel_type.c4
-rw-r--r--libdw/dwarf_siblingof.c4
-rw-r--r--libdw/dwarf_srclang.c3
-rw-r--r--libdw/dwarf_tag.c3
-rw-r--r--libdw/dwarf_whatattr.c3
-rw-r--r--libdw/dwarf_whatform.c3
-rw-r--r--libdw/libdw_visit_scopes.c20
-rw-r--r--libdwfl/ChangeLog10
-rw-r--r--libdwfl/core-file.c4
-rw-r--r--libdwfl/dwfl_error.c3
-rw-r--r--libdwfl/dwfl_module_dwarf_cfi.c4
-rw-r--r--libdwfl/dwfl_module_eh_cfi.c4
-rw-r--r--libdwfl/dwfl_module_register_names.c11
-rw-r--r--libdwfl/dwfl_module_return_value_location.c6
-rw-r--r--libdwfl/dwfl_version.c3
-rw-r--r--libebl/ChangeLog4
-rw-r--r--libebl/ebl_check_special_section.c7
-rw-r--r--libebl/ebl_check_special_symbol.c8
-rw-r--r--libebl/ebl_syscall_abi.c7
-rw-r--r--libebl/eblabicfi.c4
-rw-r--r--libebl/eblauxvinfo.c7
-rw-r--r--libebl/eblbackendname.c3
-rw-r--r--libebl/eblbsspltp.c3
-rw-r--r--libebl/eblcheckobjattr.c10
-rw-r--r--libebl/eblcopyrelocp.c4
-rw-r--r--libebl/eblcorenote.c14
-rw-r--r--libebl/eblcorenotetypename.c6
-rw-r--r--libebl/ebldebugscnp.c4
-rw-r--r--libebl/ebldynamictagcheck.c4
-rw-r--r--libebl/ebldynamictagname.c6
-rw-r--r--libebl/eblelfclass.c3
-rw-r--r--libebl/eblelfdata.c3
-rw-r--r--libebl/eblelfmachine.c3
-rw-r--r--libebl/eblgotpcreloccheck.c4
-rw-r--r--libebl/eblmachineflagcheck.c4
-rw-r--r--libebl/eblmachineflagname.c6
-rw-r--r--libebl/eblmachinesectionflagcheck.c4
-rw-r--r--libebl/eblnonerelocp.c4
-rw-r--r--libebl/eblobjecttypename.c6
-rw-r--r--libebl/eblobjnote.c8
-rw-r--r--libebl/eblobjnotetypename.c8
-rw-r--r--libebl/eblopenbackend.c8
-rw-r--r--libebl/eblosabiname.c6
-rw-r--r--libebl/eblreginfo.c12
-rw-r--r--libebl/eblrelativerelocp.c4
-rw-r--r--libebl/eblrelocsimpletype.c4
-rw-r--r--libebl/eblreloctypecheck.c4
-rw-r--r--libebl/eblreloctypename.c6
-rw-r--r--libebl/eblrelocvaliduse.c4
-rw-r--r--libebl/eblretval.c6
-rw-r--r--libebl/eblsectionname.c10
-rw-r--r--libebl/eblsectiontypename.c6
-rw-r--r--libebl/eblsegmenttypename.c6
-rw-r--r--libebl/eblshflagscombine.c5
-rw-r--r--libebl/eblsymbolbindingname.c6
-rw-r--r--libebl/eblsymboltypename.c6
-rw-r--r--libebl/eblsysvhashentrysize.c3
-rw-r--r--libelf/ChangeLog4
-rw-r--r--libelf/elf32_checksum.c5
-rw-r--r--libelf/elf32_fsize.c7
-rw-r--r--libelf/elf32_getehdr.c12
-rw-r--r--libelf/elf32_getphdr.c8
-rw-r--r--libelf/elf32_getshdr.c11
-rw-r--r--libelf/elf32_newehdr.c5
-rw-r--r--libelf/elf32_newphdr.c6
-rw-r--r--libelf/elf32_offscn.c6
-rw-r--r--libelf/elf32_xlatetof.c8
-rw-r--r--libelf/elf32_xlatetom.c8
-rw-r--r--libelf/elf_begin.c10
-rw-r--r--libelf/elf_cntl.c6
-rw-r--r--libelf/elf_end.c5
-rw-r--r--libelf/elf_error.c8
-rw-r--r--libelf/elf_fill.c5
-rw-r--r--libelf/elf_flagdata.c7
-rw-r--r--libelf/elf_flagehdr.c7
-rw-r--r--libelf/elf_flagelf.c7
-rw-r--r--libelf/elf_flagphdr.c7
-rw-r--r--libelf/elf_flagscn.c7
-rw-r--r--libelf/elf_flagshdr.c7
-rw-r--r--libelf/elf_getarhdr.c5
-rw-r--r--libelf/elf_getaroff.c5
-rw-r--r--libelf/elf_getarsym.c4
-rw-r--r--libelf/elf_getbase.c5
-rw-r--r--libelf/elf_getdata.c8
-rw-r--r--libelf/elf_getdata_rawchunk.c8
-rw-r--r--libelf/elf_getident.c6
-rw-r--r--libelf/elf_getphdrnum.c14
-rw-r--r--libelf/elf_getscn.c6
-rw-r--r--libelf/elf_getshdrnum.c10
-rw-r--r--libelf/elf_getshdrstrndx.c6
-rw-r--r--libelf/elf_gnu_hash.c5
-rw-r--r--libelf/elf_hash.c5
-rw-r--r--libelf/elf_kind.c5
-rw-r--r--libelf/elf_memory.c6
-rw-r--r--libelf/elf_ndxscn.c5
-rw-r--r--libelf/elf_newscn.c5
-rw-r--r--libelf/elf_next.c5
-rw-r--r--libelf/elf_nextscn.c6
-rw-r--r--libelf/elf_rand.c6
-rw-r--r--libelf/elf_rawdata.c6
-rw-r--r--libelf/elf_rawfile.c6
-rw-r--r--libelf/elf_readall.c5
-rw-r--r--libelf/elf_strptr.c5
-rw-r--r--libelf/elf_update.c4
-rw-r--r--libelf/elf_version.c5
-rw-r--r--libelf/gelf_checksum.c5
-rw-r--r--libelf/gelf_fsize.c8
-rw-r--r--libelf/gelf_getauxv.c7
-rw-r--r--libelf/gelf_getclass.c5
-rw-r--r--libelf/gelf_getdyn.c7
-rw-r--r--libelf/gelf_getehdr.c10
-rw-r--r--libelf/gelf_getlib.c7
-rw-r--r--libelf/gelf_getmove.c7
-rw-r--r--libelf/gelf_getnote.c10
-rw-r--r--libelf/gelf_getphdr.c7
-rw-r--r--libelf/gelf_getrel.c7
-rw-r--r--libelf/gelf_getrela.c7
-rw-r--r--libelf/gelf_getshdr.c6
-rw-r--r--libelf/gelf_getsym.c7
-rw-r--r--libelf/gelf_getsyminfo.c7
-rw-r--r--libelf/gelf_getsymshndx.c10
-rw-r--r--libelf/gelf_getverdaux.c7
-rw-r--r--libelf/gelf_getverdef.c7
-rw-r--r--libelf/gelf_getvernaux.c7
-rw-r--r--libelf/gelf_getverneed.c7
-rw-r--r--libelf/gelf_getversym.c7
-rw-r--r--libelf/gelf_newehdr.c6
-rw-r--r--libelf/gelf_newphdr.c6
-rw-r--r--libelf/gelf_offscn.c6
-rw-r--r--libelf/gelf_update_auxv.c7
-rw-r--r--libelf/gelf_update_dyn.c7
-rw-r--r--libelf/gelf_update_lib.c7
-rw-r--r--libelf/gelf_update_move.c7
-rw-r--r--libelf/gelf_update_sym.c7
-rw-r--r--libelf/gelf_update_syminfo.c7
-rw-r--r--libelf/gelf_update_symshndx.c10
-rw-r--r--libelf/gelf_update_verdaux.c7
-rw-r--r--libelf/gelf_update_verdef.c7
-rw-r--r--libelf/gelf_update_vernaux.c7
-rw-r--r--libelf/gelf_update_verneed.c7
-rw-r--r--libelf/gelf_update_versym.c7
-rw-r--r--libelf/gelf_xlatetof.c9
-rw-r--r--libelf/gelf_xlatetom.c9
-rw-r--r--src/ChangeLog4
-rw-r--r--src/strip.c4
236 files changed, 481 insertions, 1050 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog
index 2059d862..9d98f35f 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * arm_attrs.c: Remove old-style function definitions.
+ * linux-core-note.c: Likewise.
+ * ppc_attrs.c: Likewise.
+
2015-09-04 Chih-Hung Hsieh <chh@google.com>
* aarch64_init.c (aarch64_init): Replace K&R function definition
diff --git a/backends/arm_attrs.c b/backends/arm_attrs.c
index c858715d..6842b771 100644
--- a/backends/arm_attrs.c
+++ b/backends/arm_attrs.c
@@ -44,13 +44,9 @@
} while (0)
bool
-arm_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)
- Ebl *ebl __attribute__ ((unused));
- const char *vendor;
- int tag;
- uint64_t value __attribute__ ((unused));
- const char **tag_name;
- const char **value_name;
+arm_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
+ const char *vendor, int tag, uint64_t value,
+ const char **tag_name, const char **value_name)
{
if (!strcmp (vendor, "aeabi"))
switch (tag)
diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
index db82e85e..ff2b226f 100644
--- a/backends/linux-core-note.c
+++ b/backends/linux-core-note.c
@@ -204,14 +204,10 @@ static const Ebl_Core_Item vmcoreinfo_items[] =
#undef FIELD
int
-EBLHOOK(core_note) (nhdr, name, regs_offset, nregloc, reglocs, nitems, items)
- const GElf_Nhdr *nhdr;
- const char *name;
- GElf_Word *regs_offset;
- size_t *nregloc;
- const Ebl_Register_Location **reglocs;
- size_t *nitems;
- const Ebl_Core_Item **items;
+EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name,
+ GElf_Word *regs_offset, size_t *nregloc,
+ const Ebl_Register_Location **reglocs,
+ size_t *nitems, const Ebl_Core_Item **items)
{
switch (nhdr->n_namesz)
{
diff --git a/backends/ppc_attrs.c b/backends/ppc_attrs.c
index ebeafe5a..612c5769 100644
--- a/backends/ppc_attrs.c
+++ b/backends/ppc_attrs.c
@@ -37,13 +37,9 @@
#include "libebl_CPU.h"
bool
-ppc_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)
- Ebl *ebl __attribute__ ((unused));
- const char *vendor;
- int tag;
- uint64_t value;
- const char **tag_name;
- const char **value_name;
+ppc_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
+ const char *vendor, int tag, uint64_t value,
+ const char **tag_name, const char **value_name)
{
if (!strcmp (vendor, "gnu"))
switch (tag)
diff --git a/config/ChangeLog b/config/ChangeLog
index 31eeca7a..067af115 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * eu.am (AM_CFLAGS): Add -Wold-style-definition -Wstrict-prototypes.
+
2015-08-04 Mark Wielaard <mjw@redhat.com>
* 10-default-yama-scope.conf: New file.
diff --git a/config/eu.am b/config/eu.am
index 70d32deb..441b68dd 100644
--- a/config/eu.am
+++ b/config/eu.am
@@ -39,6 +39,7 @@ else
STACK_USAGE_WARNING=
endif
AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ -Wold-style-definition -Wstrict-prototypes \
$(if $($(*F)_no_Werror),,-Werror) \
$(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
$(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
diff --git a/lib/ChangeLog b/lib/ChangeLog
index d04bf172..d1bdc7bc 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,12 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * dynamicsizehash.c: Remove old-style function definitions.
+ * md5.c: Likewise.
+ * sha1.c: Likewise.
+ * xmalloc.c: Likewise.
+ * xstrdup.c: Likewise.
+ * xstrndup.c: Likewise.
+
2015-05-31 Mark Wielaard <mjw@redhat.com>
* eu-config.h (ALLOW_UNALIGNED): Define when ! CHECK_UNDEFINED.
diff --git a/lib/dynamicsizehash.c b/lib/dynamicsizehash.c
index 1fdff1b0..f9406eba 100644
--- a/lib/dynamicsizehash.c
+++ b/lib/dynamicsizehash.c
@@ -44,10 +44,7 @@
static size_t
-lookup (htab, hval, val)
- NAME *htab;
- HASHTYPE hval;
- TYPE val __attribute__ ((unused));
+lookup (NAME *htab, HASHTYPE hval, TYPE val __attribute__ ((unused)))
{
/* First hash function: simply take the modul but prevent zero. Small values
can skip the division, which helps performance when this is common. */
@@ -176,9 +173,7 @@ int
#define INIT(name) _INIT (name)
#define _INIT(name) \
name##_init
-INIT(NAME) (htab, init_size)
- NAME *htab;
- size_t init_size;
+INIT(NAME) (NAME *htab, size_t init_size)
{
/* We need the size to be a prime. */
init_size = next_prime (init_size);
@@ -201,8 +196,7 @@ int
#define FREE(name) _FREE (name)
#define _FREE(name) \
name##_free
-FREE(NAME) (htab)
- NAME *htab;
+FREE(NAME) (NAME *htab)
{
free (htab->table);
return 0;
@@ -213,10 +207,7 @@ int
#define INSERT(name) _INSERT (name)
#define _INSERT(name) \
name##_insert
-INSERT(NAME) (htab, hval, data)
- NAME *htab;
- HASHTYPE hval;
- TYPE data;
+INSERT(NAME) (NAME *htab, HASHTYPE hval, TYPE data)
{
size_t idx;
@@ -240,10 +231,7 @@ int
#define INSERT(name) _INSERT (name)
#define _INSERT(name) \
name##_overwrite
-INSERT(NAME) (htab, hval, data)
- NAME *htab;
- HASHTYPE hval;
- TYPE data;
+INSERT(NAME) (NAME *htab, HASHTYPE hval, TYPE data)
{
size_t idx;
@@ -263,10 +251,7 @@ TYPE
#define FIND(name) _FIND (name)
#define _FIND(name) \
name##_find
-FIND(NAME) (htab, hval, val)
- NAME *htab;
- HASHTYPE hval;
- TYPE val;
+FIND(NAME) (NAME *htab, HASHTYPE hval, TYPE val)
{
size_t idx;
@@ -287,9 +272,7 @@ FIND(NAME) (htab, hval, val)
# define _ITERATEFCT(name) \
name##_iterate
TYPE
-ITERATEFCT(NAME) (htab, ptr)
- NAME *htab;
- void **ptr;
+ITERATEFCT(NAME) (NAME *htab, void **ptr)
{
void *p = *ptr;
diff --git a/lib/md5.c b/lib/md5.c
index 1c27549c..40f30449 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -1,6 +1,6 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995-2011 Red Hat, Inc.
+ Copyright (C) 1995-2011, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1995.
@@ -49,8 +49,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
void
-md5_init_ctx (ctx)
- struct md5_ctx *ctx;
+md5_init_ctx (struct md5_ctx *ctx)
{
ctx->A = 0x67452301;
ctx->B = 0xefcdab89;
@@ -67,9 +66,7 @@ md5_init_ctx (ctx)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-md5_read_ctx (ctx, resbuf)
- const struct md5_ctx *ctx;
- void *resbuf;
+md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
{
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
@@ -95,9 +92,7 @@ le64_copy (char *dest, uint64_t x)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-md5_finish_ctx (ctx, resbuf)
- struct md5_ctx *ctx;
- void *resbuf;
+md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
{
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
@@ -129,9 +124,7 @@ md5_finish_ctx (ctx, resbuf)
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
int
-md5_stream (stream, resblock)
- FILE *stream;
- void *resblock;
+md5_stream (FILE *stream, void *resblock)
{
/* Important: BLOCKSIZE must be a multiple of 64. */
#define BLOCKSIZE 4096
@@ -189,10 +182,7 @@ md5_stream (stream, resblock)
output yields to the wanted ASCII representation of the message
digest. */
void *
-md5_buffer (buffer, len, resblock)
- const char *buffer;
- size_t len;
- void *resblock;
+md5_buffer (const char *buffer, size_t len, void *resblock)
{
struct md5_ctx ctx;
@@ -209,10 +199,7 @@ md5_buffer (buffer, len, resblock)
void
-md5_process_bytes (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
@@ -296,10 +283,7 @@ md5_process_bytes (buffer, len, ctx)
It is assumed that LEN % 64 == 0. */
void
-md5_process_block (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
{
md5_uint32 correct_words[16];
const md5_uint32 *words = buffer;
diff --git a/lib/sha1.c b/lib/sha1.c
index 0e845629..6a9b61f8 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -1,6 +1,6 @@
/* Functions to compute SHA1 message digest of files or memory blocks.
according to the definition of SHA1 in FIPS 180-1 from April 1997.
- Copyright (C) 2008-2011 Red Hat, Inc.
+ Copyright (C) 2008-2011, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2008.
@@ -48,8 +48,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
/* Initialize structure containing state of computation. */
void
-sha1_init_ctx (ctx)
- struct sha1_ctx *ctx;
+sha1_init_ctx (struct sha1_ctx *ctx)
{
ctx->A = 0x67452301;
ctx->B = 0xefcdab89;
@@ -67,9 +66,7 @@ sha1_init_ctx (ctx)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-sha1_read_ctx (ctx, resbuf)
- const struct sha1_ctx *ctx;
- void *resbuf;
+sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf)
{
((sha1_uint32 *) resbuf)[0] = SWAP (ctx->A);
((sha1_uint32 *) resbuf)[1] = SWAP (ctx->B);
@@ -93,9 +90,7 @@ be64_copy (char *dest, uint64_t x)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-sha1_finish_ctx (ctx, resbuf)
- struct sha1_ctx *ctx;
- void *resbuf;
+sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf)
{
/* Take yet unprocessed bytes into account. */
sha1_uint32 bytes = ctx->buflen;
@@ -123,10 +118,7 @@ sha1_finish_ctx (ctx, resbuf)
void
-sha1_process_bytes (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct sha1_ctx *ctx;
+sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
@@ -220,10 +212,7 @@ sha1_process_bytes (buffer, len, ctx)
It is assumed that LEN % 64 == 0. */
void
-sha1_process_block (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct sha1_ctx *ctx;
+sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx)
{
sha1_uint32 computed_words[16];
#define W(i) computed_words[(i) % 16]
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index 27ccab95..0cde384f 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -1,5 +1,5 @@
/* Convenience functions for allocation.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -44,8 +44,7 @@
/* Allocate N bytes of memory dynamically, with error checking. */
void *
-xmalloc (n)
- size_t n;
+xmalloc (size_t n)
{
void *p;
@@ -58,8 +57,7 @@ xmalloc (n)
/* Allocate memory for N elements of S bytes, with error checking. */
void *
-xcalloc (n, s)
- size_t n, s;
+xcalloc (size_t n, size_t s)
{
void *p;
@@ -73,9 +71,7 @@ xcalloc (n, s)
/* Change the size of an allocated block of memory P to N bytes,
with error checking. */
void *
-xrealloc (p, n)
- void *p;
- size_t n;
+xrealloc (void *p, size_t n)
{
p = realloc (p, n);
if (p == NULL)
diff --git a/lib/xstrdup.c b/lib/xstrdup.c
index d9d6010c..aa10352a 100644
--- a/lib/xstrdup.c
+++ b/lib/xstrdup.c
@@ -1,5 +1,5 @@
/* Convenience function for string allocation.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -36,8 +36,7 @@
/* Return a newly allocated copy of STRING. */
char *
-xstrdup (string)
- const char *string;
+xstrdup (const char *string)
{
return strcpy (xmalloc (strlen (string) + 1), string);
}
diff --git a/lib/xstrndup.c b/lib/xstrndup.c
index 52304e65..92b79c17 100644
--- a/lib/xstrndup.c
+++ b/lib/xstrndup.c
@@ -1,5 +1,5 @@
/* Convenience function for string allocation.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -36,9 +36,7 @@
/* Return a newly allocated copy of STRING. */
char *
-xstrndup (string, n)
- const char *string;
- size_t n;
+xstrndup (const char *string, size_t n)
{
char *res;
size_t len = strnlen (string, n);
diff --git a/libasm/ChangeLog b/libasm/ChangeLog
index 91338d09..0eb84c6c 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * asm_*.c: Remove old-style function definitions.
+
2015-09-04 Chih-Hung Hsieh <chh@google.com>
* asm_addint8.c (FCT): Replace K&R function definition
diff --git a/libasm/asm_abort.c b/libasm/asm_abort.c
index ef55ee9b..12743dc6 100644
--- a/libasm/asm_abort.c
+++ b/libasm/asm_abort.c
@@ -39,8 +39,7 @@
int
-asm_abort (ctx)
- AsmCtx_t *ctx;
+asm_abort (AsmCtx_t *ctx)
{
if (ctx == NULL)
/* Something went wrong earlier. */
diff --git a/libasm/asm_addsleb128.c b/libasm/asm_addsleb128.c
index 3692789d..dc62c951 100644
--- a/libasm/asm_addsleb128.c
+++ b/libasm/asm_addsleb128.c
@@ -38,9 +38,7 @@
int
-asm_addsleb128 (asmscn, num)
- AsmScn_t *asmscn;
- int32_t num;
+asm_addsleb128 (AsmScn_t *asmscn, int32_t num)
{
if (asmscn == NULL)
return -1;
diff --git a/libasm/asm_addstrz.c b/libasm/asm_addstrz.c
index 87663f3a..26e06bb2 100644
--- a/libasm/asm_addstrz.c
+++ b/libasm/asm_addstrz.c
@@ -40,10 +40,7 @@
/* Add zero terminated string STR of size LEN to (sub)section ASMSCN. */
int
-asm_addstrz (asmscn, str, len)
- AsmScn_t *asmscn;
- const char *str;
- size_t len;
+asm_addstrz (AsmScn_t *asmscn, const char *str, size_t len)
{
if (asmscn == NULL)
return -1;
diff --git a/libasm/asm_adduleb128.c b/libasm/asm_adduleb128.c
index a3a85738..96438cce 100644
--- a/libasm/asm_adduleb128.c
+++ b/libasm/asm_adduleb128.c
@@ -38,9 +38,7 @@
int
-asm_adduleb128 (asmscn, num)
- AsmScn_t *asmscn;
- uint32_t num;
+asm_adduleb128 (AsmScn_t *asmscn, uint32_t num)
{
if (asmscn == NULL)
return -1;
diff --git a/libasm/asm_align.c b/libasm/asm_align.c
index 2025b027..b7708f59 100644
--- a/libasm/asm_align.c
+++ b/libasm/asm_align.c
@@ -40,9 +40,7 @@
int
-asm_align (asmscn, value)
- AsmScn_t *asmscn;
- GElf_Word value;
+asm_align (AsmScn_t *asmscn, GElf_Word value)
{
if (asmscn == NULL)
/* An earlier error. */
@@ -134,9 +132,7 @@ asm_align (asmscn, value)
/* Ensure there are at least LEN bytes available in the output buffer
for ASMSCN. */
int
-__libasm_ensure_section_space (asmscn, len)
- AsmScn_t *asmscn;
- size_t len;
+__libasm_ensure_section_space (AsmScn_t *asmscn, size_t len)
{
/* The blocks with the section content are kept in a circular
single-linked list. */
diff --git a/libasm/asm_end.c b/libasm/asm_end.c
index f4145a75..d629fcd8 100644
--- a/libasm/asm_end.c
+++ b/libasm/asm_end.c
@@ -498,8 +498,7 @@ binary_end (AsmCtx_t *ctx)
int
-asm_end (ctx)
- AsmCtx_t *ctx;
+asm_end (AsmCtx_t *ctx)
{
int result;
@@ -555,8 +554,7 @@ free_section (AsmScn_t *scnp)
void
-__libasm_finictx (ctx)
- AsmCtx_t *ctx;
+__libasm_finictx (AsmCtx_t *ctx)
{
/* Iterate through section table and free individual entries. */
AsmScn_t *scn = ctx->section_list;
diff --git a/libasm/asm_error.c b/libasm/asm_error.c
index 300a7983..54430497 100644
--- a/libasm/asm_error.c
+++ b/libasm/asm_error.c
@@ -52,8 +52,7 @@ asm_errno (void)
void
-__libasm_seterrno (value)
- int value;
+__libasm_seterrno (int value)
{
global_error = value;
}
@@ -75,8 +74,7 @@ static const char *msgs[ASM_E_NUM] =
};
const char *
-asm_errmsg (error)
- int error;
+asm_errmsg (int error)
{
int last_error = global_error;
diff --git a/libasm/asm_fill.c b/libasm/asm_fill.c
index 6b92bc36..62d9d732 100644
--- a/libasm/asm_fill.c
+++ b/libasm/asm_fill.c
@@ -39,10 +39,7 @@
int
-asm_fill (asmscn, bytes, len)
- AsmScn_t *asmscn;
- void *bytes;
- size_t len;
+asm_fill (AsmScn_t *asmscn, void *bytes, size_t len)
{
struct FillPattern *pattern;
struct FillPattern *old_pattern;
diff --git a/libasm/asm_getelf.c b/libasm/asm_getelf.c
index edeff13f..2a5c37bb 100644
--- a/libasm/asm_getelf.c
+++ b/libasm/asm_getelf.c
@@ -37,8 +37,7 @@
Elf *
-asm_getelf (ctx)
- AsmCtx_t *ctx;
+asm_getelf (AsmCtx_t *ctx)
{
return ctx != NULL ? ctx->out.elf : NULL;
}
diff --git a/libasm/asm_newabssym.c b/libasm/asm_newabssym.c
index 4e59901a..c5b7beaa 100644
--- a/libasm/asm_newabssym.c
+++ b/libasm/asm_newabssym.c
@@ -52,13 +52,8 @@ static const AsmScn_t __libasm_abs_scn =
AsmSym_t *
-asm_newabssym (ctx, name, size, value, type, binding)
- AsmCtx_t *ctx;
- const char *name;
- GElf_Xword size;
- GElf_Addr value;
- int type;
- int binding;
+asm_newabssym (AsmCtx_t *ctx, const char *name, GElf_Xword size,
+ GElf_Addr value, int type, int binding)
{
AsmSym_t *result;
diff --git a/libasm/asm_newcomsym.c b/libasm/asm_newcomsym.c
index 7a578e0c..ee5c1409 100644
--- a/libasm/asm_newcomsym.c
+++ b/libasm/asm_newcomsym.c
@@ -52,11 +52,8 @@ static const AsmScn_t __libasm_com_scn =
AsmSym_t *
-asm_newcomsym (ctx, name, size, align)
- AsmCtx_t *ctx;
- const char *name;
- GElf_Xword size;
- GElf_Addr align;
+asm_newcomsym (AsmCtx_t *ctx, const char *name, GElf_Xword size,
+ GElf_Addr align)
{
AsmSym_t *result;
diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c
index ece7f5cb..e2367693 100644
--- a/libasm/asm_newscn.c
+++ b/libasm/asm_newscn.c
@@ -158,11 +158,8 @@ binary_newscn (AsmScn_t *result, GElf_Word type, GElf_Xword flags,
AsmScn_t *
-asm_newscn (ctx, scnname, type, flags)
- AsmCtx_t *ctx;
- const char *scnname;
- GElf_Word type;
- GElf_Xword flags;
+asm_newscn (AsmCtx_t *ctx, const char *scnname, GElf_Word type,
+ GElf_Xword flags)
{
size_t scnname_len = strlen (scnname) + 1;
AsmScn_t *result;
diff --git a/libasm/asm_newscn_ingrp.c b/libasm/asm_newscn_ingrp.c
index 6ef7cb98..fd45be62 100644
--- a/libasm/asm_newscn_ingrp.c
+++ b/libasm/asm_newscn_ingrp.c
@@ -37,12 +37,8 @@
AsmScn_t *
-asm_newscn_ingrp (ctx, scnname, type, flags, grp)
- AsmCtx_t *ctx;
- const char *scnname;
- GElf_Word type;
- GElf_Xword flags;
- AsmScnGrp_t *grp;
+asm_newscn_ingrp (AsmCtx_t *ctx, const char *scnname, GElf_Word type,
+ GElf_Xword flags, AsmScnGrp_t *grp)
{
AsmScn_t *result = INTUSE (asm_newscn) (ctx, scnname, type, flags);
diff --git a/libasm/asm_newscngrp.c b/libasm/asm_newscngrp.c
index 2808e694..c5968c1f 100644
--- a/libasm/asm_newscngrp.c
+++ b/libasm/asm_newscngrp.c
@@ -41,11 +41,8 @@
AsmScnGrp_t *
-asm_newscngrp (ctx, grpname, signature, flags)
- AsmCtx_t *ctx;
- const char *grpname;
- AsmSym_t *signature;
- Elf32_Word flags;
+asm_newscngrp (AsmCtx_t *ctx, const char *grpname, AsmSym_t *signature,
+ Elf32_Word flags)
{
AsmScnGrp_t *result;
size_t grpname_len = strlen (grpname) + 1;
diff --git a/libasm/asm_newsubscn.c b/libasm/asm_newsubscn.c
index a83607ac..906240ac 100644
--- a/libasm/asm_newsubscn.c
+++ b/libasm/asm_newsubscn.c
@@ -38,9 +38,7 @@
AsmScn_t *
-asm_newsubscn (asmscn, nr)
- AsmScn_t *asmscn;
- unsigned int nr;
+asm_newsubscn (AsmScn_t *asmscn, unsigned int nr)
{
AsmScn_t *runp;
AsmScn_t *newp;
diff --git a/libasm/asm_newsym.c b/libasm/asm_newsym.c
index deca08a4..7f522910 100644
--- a/libasm/asm_newsym.c
+++ b/libasm/asm_newsym.c
@@ -41,12 +41,8 @@
AsmSym_t *
-asm_newsym (asmscn, name, size, type, binding)
- AsmScn_t *asmscn;
- const char *name;
- GElf_Xword size;
- int type;
- int binding;
+asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size,
+ int type, int binding)
{
#define TEMPSYMLEN 10
char tempsym[TEMPSYMLEN];
diff --git a/libasm/asm_scngrp_newsignature.c b/libasm/asm_scngrp_newsignature.c
index d87f4a4e..2fbb3346 100644
--- a/libasm/asm_scngrp_newsignature.c
+++ b/libasm/asm_scngrp_newsignature.c
@@ -35,9 +35,7 @@
int
-asm_scngrp_newsignature (grp, signature)
- AsmScnGrp_t *grp;
- AsmSym_t *signature;
+asm_scngrp_newsignature (AsmScnGrp_t *grp, AsmSym_t *signature)
{
if (grp == NULL || signature == NULL)
return 1;
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 2e27ff96..cb5ec9ce 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-09-15 Mark Wielaard <mjw@redhat.com>
* dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
diff --git a/libdw/dwarf_abbrevhaschildren.c b/libdw/dwarf_abbrevhaschildren.c
index 4a83e31d..0f17c7ed 100644
--- a/libdw/dwarf_abbrevhaschildren.c
+++ b/libdw/dwarf_abbrevhaschildren.c
@@ -37,8 +37,7 @@
int
-dwarf_abbrevhaschildren (abbrev)
- Dwarf_Abbrev *abbrev;
+dwarf_abbrevhaschildren (Dwarf_Abbrev *abbrev)
{
return abbrev == NULL ? -1 : abbrev->has_children;
}
diff --git a/libdw/dwarf_addrdie.c b/libdw/dwarf_addrdie.c
index 94eb1480..3a08ab75 100644
--- a/libdw/dwarf_addrdie.c
+++ b/libdw/dwarf_addrdie.c
@@ -35,10 +35,7 @@
Dwarf_Die *
-dwarf_addrdie (dbg, addr, result)
- Dwarf *dbg;
- Dwarf_Addr addr;
- Dwarf_Die *result;
+dwarf_addrdie (Dwarf *dbg, Dwarf_Addr addr, Dwarf_Die *result)
{
Dwarf_Aranges *aranges;
size_t naranges;
diff --git a/libdw/dwarf_aggregate_size.c b/libdw/dwarf_aggregate_size.c
index 02478478..aaeb7ed9 100644
--- a/libdw/dwarf_aggregate_size.c
+++ b/libdw/dwarf_aggregate_size.c
@@ -230,9 +230,7 @@ aggregate_size (Dwarf_Die *die, Dwarf_Word *size, Dwarf_Die *type_mem)
}
int
-dwarf_aggregate_size (die, size)
- Dwarf_Die *die;
- Dwarf_Word *size;
+dwarf_aggregate_size (Dwarf_Die *die, Dwarf_Word *size)
{
Dwarf_Die type_mem;
diff --git a/libdw/dwarf_arrayorder.c b/libdw/dwarf_arrayorder.c
index 759fa4d8..da64f992 100644
--- a/libdw/dwarf_arrayorder.c
+++ b/libdw/dwarf_arrayorder.c
@@ -36,8 +36,7 @@
int
-dwarf_arrayorder (die)
- Dwarf_Die *die;
+dwarf_arrayorder (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
diff --git a/libdw/dwarf_attr.c b/libdw/dwarf_attr.c
index f247c1af..db8acfe5 100644
--- a/libdw/dwarf_attr.c
+++ b/libdw/dwarf_attr.c
@@ -36,10 +36,7 @@
Dwarf_Attribute *
-dwarf_attr (die, search_name, result)
- Dwarf_Die *die;
- unsigned int search_name;
- Dwarf_Attribute *result;
+dwarf_attr (Dwarf_Die *die, unsigned int search_name, Dwarf_Attribute *result)
{
if (die == NULL)
return NULL;
diff --git a/libdw/dwarf_begin.c b/libdw/dwarf_begin.c
index 9f3050fd..d04e5b9f 100644
--- a/libdw/dwarf_begin.c
+++ b/libdw/dwarf_begin.c
@@ -39,9 +39,7 @@
Dwarf *
-dwarf_begin (fd, cmd)
- int fd;
- Dwarf_Cmd cmd;
+dwarf_begin (int fd, Dwarf_Cmd cmd)
{
Elf *elf;
Elf_Cmd elfcmd;
diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
index 6d38946a..63532fd8 100644
--- a/libdw/dwarf_begin_elf.c
+++ b/libdw/dwarf_begin_elf.c
@@ -341,10 +341,7 @@ scngrp_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Elf_Scn *scngrp)
Dwarf *
-dwarf_begin_elf (elf, cmd, scngrp)
- Elf *elf;
- Dwarf_Cmd cmd;
- Elf_Scn *scngrp;
+dwarf_begin_elf (Elf *elf, Dwarf_Cmd cmd, Elf_Scn *scngrp)
{
GElf_Ehdr *ehdr;
GElf_Ehdr ehdr_mem;
diff --git a/libdw/dwarf_bitoffset.c b/libdw/dwarf_bitoffset.c
index 1648ecd7..c1a3a343 100644
--- a/libdw/dwarf_bitoffset.c
+++ b/libdw/dwarf_bitoffset.c
@@ -36,8 +36,7 @@
int
-dwarf_bitoffset (die)
- Dwarf_Die *die;
+dwarf_bitoffset (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
diff --git a/libdw/dwarf_bitsize.c b/libdw/dwarf_bitsize.c
index ea9946b8..0ed9b710 100644
--- a/libdw/dwarf_bitsize.c
+++ b/libdw/dwarf_bitsize.c
@@ -36,8 +36,7 @@
int
-dwarf_bitsize (die)
- Dwarf_Die *die;
+dwarf_bitsize (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
diff --git a/libdw/dwarf_bytesize.c b/libdw/dwarf_bytesize.c
index 6499a0ae..116cd321 100644
--- a/libdw/dwarf_bytesize.c
+++ b/libdw/dwarf_bytesize.c
@@ -36,8 +36,7 @@
int
-dwarf_bytesize (die)
- Dwarf_Die *die;
+dwarf_bytesize (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
diff --git a/libdw/dwarf_cfi_addrframe.c b/libdw/dwarf_cfi_addrframe.c
index 1c0da03e..44240279 100644
--- a/libdw/dwarf_cfi_addrframe.c
+++ b/libdw/dwarf_cfi_addrframe.c
@@ -33,10 +33,7 @@
#include "cfi.h"
int
-dwarf_cfi_addrframe (cache, address, frame)
- Dwarf_CFI *cache;
- Dwarf_Addr address;
- Dwarf_Frame **frame;
+dwarf_cfi_addrframe (Dwarf_CFI *cache, Dwarf_Addr address, Dwarf_Frame **frame)
{
/* Maybe there was a previous error. */
if (cache == NULL)
diff --git a/libdw/dwarf_cfi_end.c b/libdw/dwarf_cfi_end.c
index 6eb2ade8..d68e2db3 100644
--- a/libdw/dwarf_cfi_end.c
+++ b/libdw/dwarf_cfi_end.c
@@ -35,8 +35,7 @@
#include <stdlib.h>
int
-dwarf_cfi_end (cache)
- Dwarf_CFI *cache;
+dwarf_cfi_end (Dwarf_CFI *cache)
{
if (cache != NULL)
{
diff --git a/libdw/dwarf_child.c b/libdw/dwarf_child.c
index 58a438b5..cc95fb3f 100644
--- a/libdw/dwarf_child.c
+++ b/libdw/dwarf_child.c
@@ -115,9 +115,7 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name,
int
-dwarf_child (die, result)
- Dwarf_Die *die;
- Dwarf_Die *result;
+dwarf_child (Dwarf_Die *die, Dwarf_Die *result)
{
/* Ignore previous errors. */
if (die == NULL)
diff --git a/libdw/dwarf_cu_die.c b/libdw/dwarf_cu_die.c
index 48f4176f..194da58b 100644
--- a/libdw/dwarf_cu_die.c
+++ b/libdw/dwarf_cu_die.c
@@ -35,16 +35,10 @@
Dwarf_Die *
-dwarf_cu_die (cu, result, versionp, abbrev_offsetp, address_sizep,
- offset_sizep, type_signaturep, type_offsetp)
- Dwarf_CU *cu;
- Dwarf_Die *result;
- Dwarf_Half *versionp;
- Dwarf_Off *abbrev_offsetp;
- uint8_t *address_sizep;
- uint8_t *offset_sizep;
- uint64_t *type_signaturep;
- Dwarf_Off *type_offsetp;
+dwarf_cu_die (Dwarf_CU *cu, Dwarf_Die *result, Dwarf_Half *versionp,
+ Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep,
+ uint8_t *offset_sizep, uint64_t *type_signaturep,
+ Dwarf_Off *type_offsetp)
{
if (cu == NULL)
return NULL;
diff --git a/libdw/dwarf_cu_getdwarf.c b/libdw/dwarf_cu_getdwarf.c
index f8a2e9b9..562460fe 100644
--- a/libdw/dwarf_cu_getdwarf.c
+++ b/libdw/dwarf_cu_getdwarf.c
@@ -36,8 +36,7 @@
Dwarf *
-dwarf_cu_getdwarf (cu)
- Dwarf_CU *cu;
+dwarf_cu_getdwarf (Dwarf_CU *cu)
{
if (cu == NULL)
/* Some error occurred before. */
diff --git a/libdw/dwarf_cuoffset.c b/libdw/dwarf_cuoffset.c
index 3ceffdb0..ba376486 100644
--- a/libdw/dwarf_cuoffset.c
+++ b/libdw/dwarf_cuoffset.c
@@ -36,8 +36,7 @@
Dwarf_Off
-dwarf_cuoffset (die)
- Dwarf_Die *die;
+dwarf_cuoffset (Dwarf_Die *die)
{
return (die == NULL
? (Dwarf_Off) -1l
diff --git a/libdw/dwarf_diecu.c b/libdw/dwarf_diecu.c
index bd9a37ae..5281c352 100644
--- a/libdw/dwarf_diecu.c
+++ b/libdw/dwarf_diecu.c
@@ -35,11 +35,8 @@
Dwarf_Die *
-dwarf_diecu (die, result, address_sizep, offset_sizep)
- Dwarf_Die *die;
- Dwarf_Die *result;
- uint8_t *address_sizep;
- uint8_t *offset_sizep;
+dwarf_diecu (Dwarf_Die *die, Dwarf_Die *result, uint8_t *address_sizep,
+ uint8_t *offset_sizep)
{
if (die == NULL)
return NULL;
diff --git a/libdw/dwarf_diename.c b/libdw/dwarf_diename.c
index 050d8f1d..96450c1c 100644
--- a/libdw/dwarf_diename.c
+++ b/libdw/dwarf_diename.c
@@ -36,8 +36,7 @@
const char *
-dwarf_diename (die)
- Dwarf_Die *die;
+dwarf_diename (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
diff --git a/libdw/dwarf_dieoffset.c b/libdw/dwarf_dieoffset.c
index 965b2c8d..8028f6dd 100644
--- a/libdw/dwarf_dieoffset.c
+++ b/libdw/dwarf_dieoffset.c
@@ -36,8 +36,7 @@
Dwarf_Off
-dwarf_dieoffset (die)
- Dwarf_Die *die;
+dwarf_dieoffset (Dwarf_Die *die)
{
return (die == NULL
? ~0ul
diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c
index 922dc8f3..32b551df 100644
--- a/libdw/dwarf_end.c
+++ b/libdw/dwarf_end.c
@@ -76,8 +76,7 @@ __libdw_free_zdata (Dwarf *dwarf)
#endif
int
-dwarf_end (dwarf)
- Dwarf *dwarf;
+dwarf_end (Dwarf *dwarf)
{
if (dwarf != NULL)
{
diff --git a/libdw/dwarf_entry_breakpoints.c b/libdw/dwarf_entry_breakpoints.c
index ffd51697..abfee73c 100644
--- a/libdw/dwarf_entry_breakpoints.c
+++ b/libdw/dwarf_entry_breakpoints.c
@@ -35,9 +35,7 @@
int
-dwarf_entry_breakpoints (die, bkpts)
- Dwarf_Die *die;
- Dwarf_Addr **bkpts;
+dwarf_entry_breakpoints (Dwarf_Die *die, Dwarf_Addr **bkpts)
{
int nbkpts = 0;
*bkpts = NULL;
diff --git a/libdw/dwarf_entrypc.c b/libdw/dwarf_entrypc.c
index 8eb39dbc..0ef3b0ea 100644
--- a/libdw/dwarf_entrypc.c
+++ b/libdw/dwarf_entrypc.c
@@ -35,9 +35,7 @@
int
-dwarf_entrypc (die, return_addr)
- Dwarf_Die *die;
- Dwarf_Addr *return_addr;
+dwarf_entrypc (Dwarf_Die *die, Dwarf_Addr *return_addr)
{
Dwarf_Attribute attr_mem;
diff --git a/libdw/dwarf_error.c b/libdw/dwarf_error.c
index fe389995..c431bd3e 100644
--- a/libdw/dwarf_error.c
+++ b/libdw/dwarf_error.c
@@ -100,8 +100,7 @@ static const char *errmsgs[] =
void
-__libdw_seterrno (value)
- int value;
+__libdw_seterrno (int value)
{
global_error = (value >= 0 && value < (int) nerrmsgs
? value : DWARF_E_UNKNOWN_ERROR);
@@ -109,8 +108,7 @@ __libdw_seterrno (value)
const char *
-dwarf_errmsg (error)
- int error;
+dwarf_errmsg (int error)
{
int last_error = global_error;
diff --git a/libdw/dwarf_formaddr.c b/libdw/dwarf_formaddr.c
index 9d4a3887..ddc48382 100644
--- a/libdw/dwarf_formaddr.c
+++ b/libdw/dwarf_formaddr.c
@@ -36,9 +36,7 @@
int
-dwarf_formaddr (attr, return_addr)
- Dwarf_Attribute *attr;
- Dwarf_Addr *return_addr;
+dwarf_formaddr (Dwarf_Attribute *attr, Dwarf_Addr *return_addr)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_formblock.c b/libdw/dwarf_formblock.c
index 3d56f222..13f9e72a 100644
--- a/libdw/dwarf_formblock.c
+++ b/libdw/dwarf_formblock.c
@@ -36,9 +36,7 @@
int
-dwarf_formblock (attr, return_block)
- Dwarf_Attribute *attr;
- Dwarf_Block *return_block;
+dwarf_formblock (Dwarf_Attribute *attr, Dwarf_Block *return_block)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_formflag.c b/libdw/dwarf_formflag.c
index bdc2267a..b48ede4e 100644
--- a/libdw/dwarf_formflag.c
+++ b/libdw/dwarf_formflag.c
@@ -36,9 +36,7 @@
int
-dwarf_formflag (attr, return_bool)
- Dwarf_Attribute *attr;
- bool *return_bool;
+dwarf_formflag (Dwarf_Attribute *attr, bool *return_bool)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_formref.c b/libdw/dwarf_formref.c
index 25924371..c5fb19b1 100644
--- a/libdw/dwarf_formref.c
+++ b/libdw/dwarf_formref.c
@@ -35,9 +35,7 @@
#include "libdwP.h"
int
-__libdw_formref (attr, return_offset)
- Dwarf_Attribute *attr;
- Dwarf_Off *return_offset;
+__libdw_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset)
{
const unsigned char *datap = attr->valp;
const unsigned char *endp = attr->cu->endp;
@@ -102,9 +100,7 @@ __libdw_formref (attr, return_offset)
/* This is the old public entry point.
It is now deprecated in favor of dwarf_formref_die. */
int
-dwarf_formref (attr, return_offset)
- Dwarf_Attribute *attr;
- Dwarf_Off *return_offset;
+dwarf_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_formref_die.c b/libdw/dwarf_formref_die.c
index 8b92e22d..7e2b11a2 100644
--- a/libdw/dwarf_formref_die.c
+++ b/libdw/dwarf_formref_die.c
@@ -36,9 +36,7 @@
Dwarf_Die *
-dwarf_formref_die (attr, result)
- Dwarf_Attribute *attr;
- Dwarf_Die *result;
+dwarf_formref_die (Dwarf_Attribute *attr, Dwarf_Die *result)
{
if (attr == NULL)
return NULL;
diff --git a/libdw/dwarf_formsdata.c b/libdw/dwarf_formsdata.c
index 2380bf43..e7deaee1 100644
--- a/libdw/dwarf_formsdata.c
+++ b/libdw/dwarf_formsdata.c
@@ -36,9 +36,7 @@
int
-dwarf_formsdata (attr, return_sval)
- Dwarf_Attribute *attr;
- Dwarf_Sword *return_sval;
+dwarf_formsdata (Dwarf_Attribute *attr, Dwarf_Sword *return_sval)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_formstring.c b/libdw/dwarf_formstring.c
index 02b56d4a..83abd53d 100644
--- a/libdw/dwarf_formstring.c
+++ b/libdw/dwarf_formstring.c
@@ -36,8 +36,7 @@
const char *
-dwarf_formstring (attrp)
- Dwarf_Attribute *attrp;
+dwarf_formstring (Dwarf_Attribute *attrp)
{
/* Ignore earlier errors. */
if (attrp == NULL)
diff --git a/libdw/dwarf_formudata.c b/libdw/dwarf_formudata.c
index a01ff312..e41981a4 100644
--- a/libdw/dwarf_formudata.c
+++ b/libdw/dwarf_formudata.c
@@ -94,9 +94,7 @@ __libdw_formptr (Dwarf_Attribute *attr, int sec_index,
}
int
-dwarf_formudata (attr, return_uval)
- Dwarf_Attribute *attr;
- Dwarf_Word *return_uval;
+dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_frame_cfa.c b/libdw/dwarf_frame_cfa.c
index a9ae7e73..07f998cd 100644
--- a/libdw/dwarf_frame_cfa.c
+++ b/libdw/dwarf_frame_cfa.c
@@ -35,10 +35,7 @@
#include <stdlib.h>
int
-dwarf_frame_cfa (fs, ops, nops)
- Dwarf_Frame *fs;
- Dwarf_Op **ops;
- size_t *nops;
+dwarf_frame_cfa (Dwarf_Frame *fs, Dwarf_Op **ops, size_t *nops)
{
/* Maybe there was a previous error. */
if (fs == NULL)
diff --git a/libdw/dwarf_frame_info.c b/libdw/dwarf_frame_info.c
index 7da46fb0..9ba560fc 100644
--- a/libdw/dwarf_frame_info.c
+++ b/libdw/dwarf_frame_info.c
@@ -33,11 +33,8 @@
#include "cfi.h"
int
-dwarf_frame_info (fs, start, end, signalp)
- Dwarf_Frame *fs;
- Dwarf_Addr *start;
- Dwarf_Addr *end;
- bool *signalp;
+dwarf_frame_info (Dwarf_Frame *fs, Dwarf_Addr *start, Dwarf_Addr *end,
+ bool *signalp)
{
/* Maybe there was a previous error. */
if (fs == NULL)
diff --git a/libdw/dwarf_frame_register.c b/libdw/dwarf_frame_register.c
index 10d2fe49..37e8e917 100644
--- a/libdw/dwarf_frame_register.c
+++ b/libdw/dwarf_frame_register.c
@@ -34,12 +34,8 @@
#include <dwarf.h>
int
-dwarf_frame_register (fs, regno, ops_mem, ops, nops)
- Dwarf_Frame *fs;
- int regno;
- Dwarf_Op ops_mem[3];
- Dwarf_Op **ops;
- size_t *nops;
+dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem,
+ Dwarf_Op **ops, size_t *nops)
{
/* Maybe there was a previous error. */
if (fs == NULL)
diff --git a/libdw/dwarf_getabbrev.c b/libdw/dwarf_getabbrev.c
index 0efde45b..ef51b847 100644
--- a/libdw/dwarf_getabbrev.c
+++ b/libdw/dwarf_getabbrev.c
@@ -37,12 +37,8 @@
Dwarf_Abbrev *
internal_function
-__libdw_getabbrev (dbg, cu, offset, lengthp, result)
- Dwarf *dbg;
- struct Dwarf_CU *cu;
- Dwarf_Off offset;
- size_t *lengthp;
- Dwarf_Abbrev *result;
+__libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, Dwarf_Off offset,
+ size_t *lengthp, Dwarf_Abbrev *result)
{
/* Don't fail if there is not .debug_abbrev section. */
if (dbg->sectiondata[IDX_debug_abbrev] == NULL)
@@ -154,10 +150,7 @@ __libdw_getabbrev (dbg, cu, offset, lengthp, result)
Dwarf_Abbrev *
-dwarf_getabbrev (die, offset, lengthp)
- Dwarf_Die *die;
- Dwarf_Off offset;
- size_t *lengthp;
+dwarf_getabbrev (Dwarf_Die *die, Dwarf_Off offset, size_t *lengthp)
{
return __libdw_getabbrev (die->cu->dbg, die->cu,
die->cu->orig_abbrev_offset + offset, lengthp,
diff --git a/libdw/dwarf_getabbrevattr.c b/libdw/dwarf_getabbrevattr.c
index 574467ce..3b4da99c 100644
--- a/libdw/dwarf_getabbrevattr.c
+++ b/libdw/dwarf_getabbrevattr.c
@@ -37,12 +37,8 @@
int
-dwarf_getabbrevattr (abbrev, idx, namep, formp, offsetp)
- Dwarf_Abbrev *abbrev;
- size_t idx;
- unsigned int *namep;
- unsigned int *formp;
- Dwarf_Off *offsetp;
+dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep,
+ unsigned int *formp, Dwarf_Off *offsetp)
{
if (abbrev == NULL)
return -1;
diff --git a/libdw/dwarf_getabbrevcode.c b/libdw/dwarf_getabbrevcode.c
index 0df90649..86917084 100644
--- a/libdw/dwarf_getabbrevcode.c
+++ b/libdw/dwarf_getabbrevcode.c
@@ -37,8 +37,7 @@
unsigned int
-dwarf_getabbrevcode (abbrev)
- Dwarf_Abbrev *abbrev;
+dwarf_getabbrevcode (Dwarf_Abbrev *abbrev)
{
return abbrev == NULL ? 0 : abbrev->code;
}
diff --git a/libdw/dwarf_getabbrevtag.c b/libdw/dwarf_getabbrevtag.c
index 36a5262d..52aaa3f3 100644
--- a/libdw/dwarf_getabbrevtag.c
+++ b/libdw/dwarf_getabbrevtag.c
@@ -37,8 +37,7 @@
unsigned int
-dwarf_getabbrevtag (abbrev)
- Dwarf_Abbrev *abbrev;
+dwarf_getabbrevtag (Dwarf_Abbrev *abbrev)
{
return abbrev == NULL ? 0 : abbrev->tag;
}
diff --git a/libdw/dwarf_getarange_addr.c b/libdw/dwarf_getarange_addr.c
index fc143de9..d383e228 100644
--- a/libdw/dwarf_getarange_addr.c
+++ b/libdw/dwarf_getarange_addr.c
@@ -35,9 +35,7 @@
Dwarf_Arange *
-dwarf_getarange_addr (aranges, addr)
- Dwarf_Aranges *aranges;
- Dwarf_Addr addr;
+dwarf_getarange_addr (Dwarf_Aranges *aranges, Dwarf_Addr addr)
{
if (aranges == NULL)
return NULL;
diff --git a/libdw/dwarf_getaranges.c b/libdw/dwarf_getaranges.c
index 6c6169e9..4252746e 100644
--- a/libdw/dwarf_getaranges.c
+++ b/libdw/dwarf_getaranges.c
@@ -54,10 +54,7 @@ compare_aranges (const void *a, const void *b)
}
int
-dwarf_getaranges (dbg, aranges, naranges)
- Dwarf *dbg;
- Dwarf_Aranges **aranges;
- size_t *naranges;
+dwarf_getaranges (Dwarf *dbg, Dwarf_Aranges **aranges, size_t *naranges)
{
if (dbg == NULL)
return -1;
diff --git a/libdw/dwarf_getattrcnt.c b/libdw/dwarf_getattrcnt.c
index 72be766e..2bfb4ac5 100644
--- a/libdw/dwarf_getattrcnt.c
+++ b/libdw/dwarf_getattrcnt.c
@@ -35,9 +35,7 @@
int
-dwarf_getattrcnt (abbrev, attrcntp)
- Dwarf_Abbrev *abbrev;
- size_t *attrcntp;
+dwarf_getattrcnt (Dwarf_Abbrev *abbrev, size_t *attrcntp)
{
if (abbrev == NULL)
return -1;
diff --git a/libdw/dwarf_getcfi.c b/libdw/dwarf_getcfi.c
index a49a9f06..9aed403e 100644
--- a/libdw/dwarf_getcfi.c
+++ b/libdw/dwarf_getcfi.c
@@ -35,8 +35,7 @@
#include <dwarf.h>
Dwarf_CFI *
-dwarf_getcfi (dbg)
- Dwarf *dbg;
+dwarf_getcfi (Dwarf *dbg)
{
if (dbg == NULL)
return NULL;
diff --git a/libdw/dwarf_getcfi_elf.c b/libdw/dwarf_getcfi_elf.c
index 3e611f8f..315cc02f 100644
--- a/libdw/dwarf_getcfi_elf.c
+++ b/libdw/dwarf_getcfi_elf.c
@@ -311,8 +311,7 @@ getcfi_shdr (Elf *elf, const GElf_Ehdr *ehdr)
}
Dwarf_CFI *
-dwarf_getcfi_elf (elf)
- Elf *elf;
+dwarf_getcfi_elf (Elf *elf)
{
if (elf_kind (elf) != ELF_K_ELF)
{
diff --git a/libdw/dwarf_getelf.c b/libdw/dwarf_getelf.c
index ecd18592..2d6268ea 100644
--- a/libdw/dwarf_getelf.c
+++ b/libdw/dwarf_getelf.c
@@ -37,8 +37,7 @@
Elf *
-dwarf_getelf (dwarf)
- Dwarf *dwarf;
+dwarf_getelf (Dwarf *dwarf)
{
if (dwarf == NULL)
/* Some error occurred before. */
diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c
index 0a0e04b4..a4a2761e 100644
--- a/libdw/dwarf_getlocation.c
+++ b/libdw/dwarf_getlocation.c
@@ -113,10 +113,8 @@ store_implicit_value (Dwarf *dbg, void **cache, Dwarf_Op *op)
}
int
-dwarf_getlocation_implicit_value (attr, op, return_block)
- Dwarf_Attribute *attr;
- const Dwarf_Op *op;
- Dwarf_Block *return_block;
+dwarf_getlocation_implicit_value (Dwarf_Attribute *attr, const Dwarf_Op *op,
+ Dwarf_Block *return_block)
{
if (attr == NULL)
return -1;
@@ -609,10 +607,7 @@ getlocation (struct Dwarf_CU *cu, const Dwarf_Block *block,
}
int
-dwarf_getlocation (attr, llbuf, listlen)
- Dwarf_Attribute *attr;
- Dwarf_Op **llbuf;
- size_t *listlen;
+dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **llbuf, size_t *listlen)
{
if (! attr_ok (attr))
return -1;
@@ -630,9 +625,7 @@ dwarf_getlocation (attr, llbuf, listlen)
}
static int
-attr_base_address (attr, basep)
- Dwarf_Attribute *attr;
- Dwarf_Addr *basep;
+attr_base_address (Dwarf_Attribute *attr, Dwarf_Addr *basep)
{
/* Fetch the CU's base address. */
Dwarf_Die cudie = CUDIE (attr->cu);
@@ -661,10 +654,8 @@ attr_base_address (attr, basep)
}
static int
-initial_offset_base (attr, offset, basep)
- Dwarf_Attribute *attr;
- ptrdiff_t *offset;
- Dwarf_Addr *basep;
+initial_offset_base (Dwarf_Attribute *attr, ptrdiff_t *offset,
+ Dwarf_Addr *basep)
{
if (attr_base_address (attr, basep) != 0)
return -1;
@@ -738,12 +729,8 @@ getlocations_addr (Dwarf_Attribute *attr, ptrdiff_t offset,
}
int
-dwarf_getlocation_addr (attr, address, llbufs, listlens, maxlocs)
- Dwarf_Attribute *attr;
- Dwarf_Addr address;
- Dwarf_Op **llbufs;
- size_t *listlens;
- size_t maxlocs;
+dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address,
+ Dwarf_Op **llbufs, size_t *listlens, size_t maxlocs)
{
if (! attr_ok (attr))
return -1;
@@ -813,14 +800,9 @@ dwarf_getlocation_addr (attr, address, llbufs, listlens, maxlocs)
}
ptrdiff_t
-dwarf_getlocations (attr, offset, basep, startp, endp, expr, exprlen)
- Dwarf_Attribute *attr;
- ptrdiff_t offset;
- Dwarf_Addr *basep;
- Dwarf_Addr *startp;
- Dwarf_Addr *endp;
- Dwarf_Op **expr;
- size_t *exprlen;
+dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr *basep,
+ Dwarf_Addr *startp, Dwarf_Addr *endp, Dwarf_Op **expr,
+ size_t *exprlen)
{
if (! attr_ok (attr))
return -1;
diff --git a/libdw/dwarf_getlocation_attr.c b/libdw/dwarf_getlocation_attr.c
index 3229baf6..8b6a4afd 100644
--- a/libdw/dwarf_getlocation_attr.c
+++ b/libdw/dwarf_getlocation_attr.c
@@ -53,10 +53,7 @@ attr_form_cu (Dwarf_Attribute *attr)
}
int
-dwarf_getlocation_attr (attr, op, result)
- Dwarf_Attribute *attr;
- const Dwarf_Op *op;
- Dwarf_Attribute *result;
+dwarf_getlocation_attr (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Attribute *result)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_getlocation_die.c b/libdw/dwarf_getlocation_die.c
index fa03aac2..b4908d2b 100644
--- a/libdw/dwarf_getlocation_die.c
+++ b/libdw/dwarf_getlocation_die.c
@@ -34,10 +34,8 @@
#include <libdwP.h>
int
-dwarf_getlocation_die (attr, op, result)
- Dwarf_Attribute *attr;
- const Dwarf_Op *op;
- Dwarf_Die *result;
+dwarf_getlocation_die (Dwarf_Attribute *attr, const Dwarf_Op *op,
+ Dwarf_Die *result)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_getlocation_implicit_pointer.c b/libdw/dwarf_getlocation_implicit_pointer.c
index f1c16be7..95053820 100644
--- a/libdw/dwarf_getlocation_implicit_pointer.c
+++ b/libdw/dwarf_getlocation_implicit_pointer.c
@@ -49,10 +49,8 @@ __libdw_empty_loc_attr (Dwarf_Attribute *attr)
}
int
-dwarf_getlocation_implicit_pointer (attr, op, result)
- Dwarf_Attribute *attr;
- const Dwarf_Op *op;
- Dwarf_Attribute *result;
+dwarf_getlocation_implicit_pointer (Dwarf_Attribute *attr, const Dwarf_Op *op,
+ Dwarf_Attribute *result)
{
if (attr == NULL)
return -1;
diff --git a/libdw/dwarf_getmacros.c b/libdw/dwarf_getmacros.c
index a326e586..eb505085 100644
--- a/libdw/dwarf_getmacros.c
+++ b/libdw/dwarf_getmacros.c
@@ -511,11 +511,8 @@ dwarf_getmacros_off (Dwarf *dbg, Dwarf_Off macoff,
}
ptrdiff_t
-dwarf_getmacros (cudie, callback, arg, token)
- Dwarf_Die *cudie;
- int (*callback) (Dwarf_Macro *, void *);
- void *arg;
- ptrdiff_t token;
+dwarf_getmacros (Dwarf_Die *cudie, int (*callback) (Dwarf_Macro *, void *),
+ void *arg, ptrdiff_t token)
{
if (cudie == NULL)
{
diff --git a/libdw/dwarf_getpubnames.c b/libdw/dwarf_getpubnames.c
index 41b2407b..462b6ff0 100644
--- a/libdw/dwarf_getpubnames.c
+++ b/libdw/dwarf_getpubnames.c
@@ -140,11 +140,9 @@ get_offsets (Dwarf *dbg)
ptrdiff_t
-dwarf_getpubnames (dbg, callback, arg, offset)
- Dwarf *dbg;
- int (*callback) (Dwarf *, Dwarf_Global *, void *);
- void *arg;
- ptrdiff_t offset;
+dwarf_getpubnames (Dwarf *dbg,
+ int (*callback) (Dwarf *, Dwarf_Global *, void *),
+ void *arg, ptrdiff_t offset)
{
if (dbg == NULL)
return -1l;
diff --git a/libdw/dwarf_getsrcdirs.c b/libdw/dwarf_getsrcdirs.c
index 47283ec2..8160ed30 100644
--- a/libdw/dwarf_getsrcdirs.c
+++ b/libdw/dwarf_getsrcdirs.c
@@ -34,10 +34,7 @@
int
-dwarf_getsrcdirs (files, result, ndirs)
- Dwarf_Files *files;
- const char *const **result;
- size_t *ndirs;
+dwarf_getsrcdirs (Dwarf_Files *files, const char *const **result, size_t *ndirs)
{
if (files == NULL)
return -1;
diff --git a/libdw/dwarf_getstring.c b/libdw/dwarf_getstring.c
index 672bb27e..5620cb07 100644
--- a/libdw/dwarf_getstring.c
+++ b/libdw/dwarf_getstring.c
@@ -36,10 +36,7 @@
const char *
-dwarf_getstring (dbg, offset, lenp)
- Dwarf *dbg;
- Dwarf_Off offset;
- size_t *lenp;
+dwarf_getstring (Dwarf *dbg, Dwarf_Off offset, size_t *lenp)
{
if (dbg == NULL)
return NULL;
diff --git a/libdw/dwarf_hasattr.c b/libdw/dwarf_hasattr.c
index 812c09bc..2bb8dc82 100644
--- a/libdw/dwarf_hasattr.c
+++ b/libdw/dwarf_hasattr.c
@@ -36,9 +36,7 @@
int
-dwarf_hasattr (die, search_name)
- Dwarf_Die *die;
- unsigned int search_name;
+dwarf_hasattr (Dwarf_Die *die, unsigned int search_name)
{
if (die == NULL)
return 0;
diff --git a/libdw/dwarf_haschildren.c b/libdw/dwarf_haschildren.c
index d0ce51ea..03a81737 100644
--- a/libdw/dwarf_haschildren.c
+++ b/libdw/dwarf_haschildren.c
@@ -36,8 +36,7 @@
int
-dwarf_haschildren (die)
- Dwarf_Die *die;
+dwarf_haschildren (Dwarf_Die *die)
{
/* Find the abbreviation entry. */
Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL);
diff --git a/libdw/dwarf_hasform.c b/libdw/dwarf_hasform.c
index a95ca9ea..a0c32298 100644
--- a/libdw/dwarf_hasform.c
+++ b/libdw/dwarf_hasform.c
@@ -36,9 +36,7 @@
int
-dwarf_hasform (attr, search_form)
- Dwarf_Attribute *attr;
- unsigned int search_form;
+dwarf_hasform (Dwarf_Attribute *attr, unsigned int search_form)
{
if (attr == NULL)
return 0;
diff --git a/libdw/dwarf_highpc.c b/libdw/dwarf_highpc.c
index 8bf93f03..20702545 100644
--- a/libdw/dwarf_highpc.c
+++ b/libdw/dwarf_highpc.c
@@ -36,9 +36,7 @@
int
-dwarf_highpc (die, return_addr)
- Dwarf_Die *die;
- Dwarf_Addr *return_addr;
+dwarf_highpc (Dwarf_Die *die, Dwarf_Addr *return_addr)
{
Dwarf_Attribute attr_high_mem;
Dwarf_Attribute *attr_high = INTUSE(dwarf_attr) (die, DW_AT_high_pc,
diff --git a/libdw/dwarf_lowpc.c b/libdw/dwarf_lowpc.c
index 4677aed8..b3be2b0e 100644
--- a/libdw/dwarf_lowpc.c
+++ b/libdw/dwarf_lowpc.c
@@ -36,9 +36,7 @@
int
-dwarf_lowpc (die, return_addr)
- Dwarf_Die *die;
- Dwarf_Addr *return_addr;
+dwarf_lowpc (Dwarf_Die *die, Dwarf_Addr *return_addr)
{
Dwarf_Attribute attr_mem;
diff --git a/libdw/dwarf_nextcu.c b/libdw/dwarf_nextcu.c
index 875d8694..fa9b0af3 100644
--- a/libdw/dwarf_nextcu.c
+++ b/libdw/dwarf_nextcu.c
@@ -36,18 +36,11 @@
int
-dwarf_next_unit (dwarf, off, next_off, header_sizep, versionp, abbrev_offsetp,
- address_sizep, offset_sizep, type_signaturep, type_offsetp)
- Dwarf *dwarf;
- Dwarf_Off off;
- Dwarf_Off *next_off;
- size_t *header_sizep;
- Dwarf_Half *versionp;
- Dwarf_Off *abbrev_offsetp;
- uint8_t *address_sizep;
- uint8_t *offset_sizep;
- uint64_t *type_signaturep;
- Dwarf_Off *type_offsetp;
+dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off,
+ size_t *header_sizep, Dwarf_Half *versionp,
+ Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep,
+ uint8_t *offset_sizep, uint64_t *type_signaturep,
+ Dwarf_Off *type_offsetp)
{
const bool debug_types = type_signaturep != NULL;
const size_t sec_idx = debug_types ? IDX_debug_types : IDX_debug_info;
@@ -182,15 +175,9 @@ dwarf_next_unit (dwarf, off, next_off, header_sizep, versionp, abbrev_offsetp,
INTDEF(dwarf_next_unit)
int
-dwarf_nextcu (dwarf, off, next_off, header_sizep, abbrev_offsetp,
- address_sizep, offset_sizep)
- Dwarf *dwarf;
- Dwarf_Off off;
- Dwarf_Off *next_off;
- size_t *header_sizep;
- Dwarf_Off *abbrev_offsetp;
- uint8_t *address_sizep;
- uint8_t *offset_sizep;
+dwarf_nextcu (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off,
+ size_t *header_sizep, Dwarf_Off *abbrev_offsetp,
+ uint8_t *address_sizep, uint8_t *offset_sizep)
{
return INTUSE(dwarf_next_unit) (dwarf, off, next_off, header_sizep, NULL,
abbrev_offsetp, address_sizep, offset_sizep,
diff --git a/libdw/dwarf_offdie.c b/libdw/dwarf_offdie.c
index b5dd405d..15f55c22 100644
--- a/libdw/dwarf_offdie.c
+++ b/libdw/dwarf_offdie.c
@@ -71,20 +71,14 @@ __libdw_offdie (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result,
Dwarf_Die *
-dwarf_offdie (dbg, offset, result)
- Dwarf *dbg;
- Dwarf_Off offset;
- Dwarf_Die *result;
+dwarf_offdie (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result)
{
return __libdw_offdie (dbg, offset, result, false);
}
INTDEF(dwarf_offdie)
Dwarf_Die *
-dwarf_offdie_types (dbg, offset, result)
- Dwarf *dbg;
- Dwarf_Off offset;
- Dwarf_Die *result;
+dwarf_offdie_types (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result)
{
return __libdw_offdie (dbg, offset, result, true);
}
diff --git a/libdw/dwarf_peel_type.c b/libdw/dwarf_peel_type.c
index 7b29d35a..5dca8f88 100644
--- a/libdw/dwarf_peel_type.c
+++ b/libdw/dwarf_peel_type.c
@@ -36,9 +36,7 @@
int
-dwarf_peel_type (die, result)
- Dwarf_Die *die;
- Dwarf_Die *result;
+dwarf_peel_type (Dwarf_Die *die, Dwarf_Die *result)
{
int tag;
diff --git a/libdw/dwarf_siblingof.c b/libdw/dwarf_siblingof.c
index 0dafc179..df39c1cb 100644
--- a/libdw/dwarf_siblingof.c
+++ b/libdw/dwarf_siblingof.c
@@ -37,9 +37,7 @@
int
-dwarf_siblingof (die, result)
- Dwarf_Die *die;
- Dwarf_Die *result;
+dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result)
{
/* Ignore previous errors. */
if (die == NULL)
diff --git a/libdw/dwarf_srclang.c b/libdw/dwarf_srclang.c
index 6cc06ffb..f10e7642 100644
--- a/libdw/dwarf_srclang.c
+++ b/libdw/dwarf_srclang.c
@@ -36,8 +36,7 @@
int
-dwarf_srclang (die)
- Dwarf_Die *die;
+dwarf_srclang (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
diff --git a/libdw/dwarf_tag.c b/libdw/dwarf_tag.c
index 0b1a4b08..331eaa0d 100644
--- a/libdw/dwarf_tag.c
+++ b/libdw/dwarf_tag.c
@@ -79,8 +79,7 @@ __libdw_findabbrev (struct Dwarf_CU *cu, unsigned int code)
int
-dwarf_tag (die)
- Dwarf_Die *die;
+dwarf_tag (Dwarf_Die *die)
{
/* Find the abbreviation entry. */
Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL);
diff --git a/libdw/dwarf_whatattr.c b/libdw/dwarf_whatattr.c
index 8fe5535b..d664b021 100644
--- a/libdw/dwarf_whatattr.c
+++ b/libdw/dwarf_whatattr.c
@@ -36,8 +36,7 @@
unsigned int
-dwarf_whatattr (attr)
- Dwarf_Attribute *attr;
+dwarf_whatattr (Dwarf_Attribute *attr)
{
return attr == NULL ? 0 : attr->code;
}
diff --git a/libdw/dwarf_whatform.c b/libdw/dwarf_whatform.c
index 1d0d14b0..dee29a9f 100644
--- a/libdw/dwarf_whatform.c
+++ b/libdw/dwarf_whatform.c
@@ -36,8 +36,7 @@
unsigned int
-dwarf_whatform (attr)
- Dwarf_Attribute *attr;
+dwarf_whatform (Dwarf_Attribute *attr)
{
return attr == NULL ? 0 : attr->form;
}
diff --git a/libdw/libdw_visit_scopes.c b/libdw/libdw_visit_scopes.c
index d0b5134d..c882e4a5 100644
--- a/libdw/libdw_visit_scopes.c
+++ b/libdw/libdw_visit_scopes.c
@@ -65,13 +65,15 @@ may_have_scopes (Dwarf_Die *die)
}
int
-__libdw_visit_scopes (depth, root, imports, previsit, postvisit, arg)
- unsigned int depth;
- struct Dwarf_Die_Chain *root;
- struct Dwarf_Die_Chain *imports;
- int (*previsit) (unsigned int depth, struct Dwarf_Die_Chain *, void *);
- int (*postvisit) (unsigned int depth, struct Dwarf_Die_Chain *, void *);
- void *arg;
+__libdw_visit_scopes (unsigned int depth, struct Dwarf_Die_Chain *root,
+ struct Dwarf_Die_Chain *imports,
+ int (*previsit) (unsigned int,
+ struct Dwarf_Die_Chain *,
+ void *),
+ int (*postvisit) (unsigned int,
+ struct Dwarf_Die_Chain *,
+ void *),
+ void *arg)
{
struct Dwarf_Die_Chain child;
int ret;
@@ -97,8 +99,8 @@ __libdw_visit_scopes (depth, root, imports, previsit, postvisit, arg)
return false;
}
- inline int walk_children ()
- {
+ inline int walk_children (void)
+{
do
{
/* For an imported unit, it is logically as if the children of
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 0ab386fb..f34087c1 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,13 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * core-file.c: Remove old-style function definitions.
+ * dwfl_error.c: Likewise.
+ * dwfl_module_dwarf_cfi.c: Likewise.
+ * dwfl_module_eh_cfi.c: Likewise.
+ * dwfl_module_register_names.c: Likewise.
+ * dwfl_module_return_value_location.c: Likewise.
+ * dwfl_version.c: Likewise.
+
2015-09-09 Chih-Hung Hsieh <chh@google.com>
Mark Wielaard <mjw@redhat.com>
diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c
index bbe0899d..ea0725bf 100644
--- a/libdwfl/core-file.c
+++ b/libdwfl/core-file.c
@@ -270,8 +270,8 @@ dwfl_elf_phdr_memory_callback (Dwfl *dwfl, int ndx,
GElf_Off end;
GElf_Addr end_vaddr;
- inline void update_end ()
- {
+ inline void update_end (void)
+{
end = (phdr.p_offset + phdr.p_filesz + align - 1) & -align;
end_vaddr = (phdr.p_vaddr + phdr.p_memsz + align - 1) & -align;
}
diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
index 56ec2b02..7bcf61cc 100644
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
@@ -138,8 +138,7 @@ __libdwfl_seterrno (Dwfl_Error error)
const char *
-dwfl_errmsg (error)
- int error;
+dwfl_errmsg (int error)
{
if (error == 0 || error == -1)
{
diff --git a/libdwfl/dwfl_module_dwarf_cfi.c b/libdwfl/dwfl_module_dwarf_cfi.c
index 5182d6a0..1dac26d5 100644
--- a/libdwfl/dwfl_module_dwarf_cfi.c
+++ b/libdwfl/dwfl_module_dwarf_cfi.c
@@ -51,9 +51,7 @@ __libdwfl_set_cfi (Dwfl_Module *mod, Dwarf_CFI **slot, Dwarf_CFI *cfi)
}
Dwarf_CFI *
-dwfl_module_dwarf_cfi (mod, bias)
- Dwfl_Module *mod;
- Dwarf_Addr *bias;
+dwfl_module_dwarf_cfi (Dwfl_Module *mod, Dwarf_Addr *bias)
{
if (mod == NULL)
return NULL;
diff --git a/libdwfl/dwfl_module_eh_cfi.c b/libdwfl/dwfl_module_eh_cfi.c
index da10d9fb..dbe43b0f 100644
--- a/libdwfl/dwfl_module_eh_cfi.c
+++ b/libdwfl/dwfl_module_eh_cfi.c
@@ -30,9 +30,7 @@
#include "../libdw/cfi.h"
Dwarf_CFI *
-dwfl_module_eh_cfi (mod, bias)
- Dwfl_Module *mod;
- Dwarf_Addr *bias;
+dwfl_module_eh_cfi (Dwfl_Module *mod, Dwarf_Addr *bias)
{
if (mod == NULL)
return NULL;
diff --git a/libdwfl/dwfl_module_register_names.c b/libdwfl/dwfl_module_register_names.c
index 2da4b539..18fed373 100644
--- a/libdwfl/dwfl_module_register_names.c
+++ b/libdwfl/dwfl_module_register_names.c
@@ -30,12 +30,11 @@
int
-dwfl_module_register_names (mod, func, arg)
- Dwfl_Module *mod;
- int (*func) (void *, int regno, const char *setname,
- const char *prefix, const char *regname,
- int bits, int type);
- void *arg;
+dwfl_module_register_names (Dwfl_Module *mod,
+ int (*func) (void *, int, const char *,
+ const char *, const char *,
+ int, int),
+ void *arg)
{
if (unlikely (mod == NULL))
return -1;
diff --git a/libdwfl/dwfl_module_return_value_location.c b/libdwfl/dwfl_module_return_value_location.c
index ad83cbf9..29da61fb 100644
--- a/libdwfl/dwfl_module_return_value_location.c
+++ b/libdwfl/dwfl_module_return_value_location.c
@@ -30,10 +30,8 @@
int
-dwfl_module_return_value_location (mod, functypedie, locops)
- Dwfl_Module *mod;
- Dwarf_Die *functypedie;
- const Dwarf_Op **locops;
+dwfl_module_return_value_location (Dwfl_Module *mod, Dwarf_Die *functypedie,
+ const Dwarf_Op **locops)
{
if (mod == NULL)
return -1;
diff --git a/libdwfl/dwfl_version.c b/libdwfl/dwfl_version.c
index 9673a536..d1c5d918 100644
--- a/libdwfl/dwfl_version.c
+++ b/libdwfl/dwfl_version.c
@@ -29,8 +29,7 @@
#include "libdwflP.h"
const char *
-dwfl_version (dwfl)
- Dwfl *dwfl __attribute__ ((unused));
+dwfl_version (Dwfl *dwfl __attribute__ ((unused)))
{
return PACKAGE_VERSION;
}
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index aab08571..4ea6d498 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-09-09 Chih-Hung Hsieh <chh@google.com>
* ebldwarftoregno.c (ebl_dwarf_to_regno): Remove redundant NULL tests
diff --git a/libebl/ebl_check_special_section.c b/libebl/ebl_check_special_section.c
index aabe44e6..903b69d5 100644
--- a/libebl/ebl_check_special_section.c
+++ b/libebl/ebl_check_special_section.c
@@ -34,11 +34,8 @@
bool
-ebl_check_special_section (ebl, ndx, shdr, sname)
- Ebl *ebl;
- int ndx;
- const GElf_Shdr *shdr;
- const char *sname;
+ebl_check_special_section (Ebl *ebl, int ndx, const GElf_Shdr *shdr,
+ const char *sname)
{
return ebl != NULL && ebl->check_special_section (ebl, ndx, shdr, sname);
}
diff --git a/libebl/ebl_check_special_symbol.c b/libebl/ebl_check_special_symbol.c
index 8e702ba3..bdcb026c 100644
--- a/libebl/ebl_check_special_symbol.c
+++ b/libebl/ebl_check_special_symbol.c
@@ -35,12 +35,8 @@
bool
-ebl_check_special_symbol (ebl, ehdr, sym, name, destshdr)
- Ebl *ebl;
- GElf_Ehdr *ehdr;
- const GElf_Sym *sym;
- const char *name;
- const GElf_Shdr *destshdr;
+ebl_check_special_symbol (Ebl *ebl, GElf_Ehdr *ehdr, const GElf_Sym *sym,
+ const char *name, const GElf_Shdr *destshdr)
{
if (ebl == NULL)
return false;
diff --git a/libebl/ebl_syscall_abi.c b/libebl/ebl_syscall_abi.c
index de737037..a25369d2 100644
--- a/libebl/ebl_syscall_abi.c
+++ b/libebl/ebl_syscall_abi.c
@@ -34,12 +34,7 @@
int
-ebl_syscall_abi (ebl, sp, pc, callno, args)
- Ebl *ebl;
- int *sp;
- int *pc;
- int *callno;
- int args[6];
+ebl_syscall_abi (Ebl *ebl, int *sp, int *pc, int *callno, int *args)
{
return ebl != NULL ? ebl->syscall_abi (ebl, sp, pc, callno, args) : -1;
}
diff --git a/libebl/eblabicfi.c b/libebl/eblabicfi.c
index 20a29ea0..6b0e18e4 100644
--- a/libebl/eblabicfi.c
+++ b/libebl/eblabicfi.c
@@ -34,9 +34,7 @@
int
-ebl_abi_cfi (ebl, abi_info)
- Ebl *ebl;
- Dwarf_CIE *abi_info;
+ebl_abi_cfi (Ebl *ebl, Dwarf_CIE *abi_info)
{
return ebl == NULL ? -1 : ebl->abi_cfi (ebl, abi_info);
}
diff --git a/libebl/eblauxvinfo.c b/libebl/eblauxvinfo.c
index 5c310b29..ce1141b8 100644
--- a/libebl/eblauxvinfo.c
+++ b/libebl/eblauxvinfo.c
@@ -85,11 +85,8 @@ static const struct
#define nauxv_types (sizeof auxv_types / sizeof auxv_types[0])
int
-ebl_auxv_info (ebl, a_type, name, format)
- Ebl *ebl;
- GElf_Xword a_type;
- const char **name;
- const char **format;
+ebl_auxv_info (Ebl *ebl, GElf_Xword a_type, const char **name,
+ const char **format)
{
int result = ebl->auxv_info (a_type, name, format);
if (result == 0 && a_type < nauxv_types && auxv_types[a_type].name != NULL)
diff --git a/libebl/eblbackendname.c b/libebl/eblbackendname.c
index 92e576ed..a2b2df69 100644
--- a/libebl/eblbackendname.c
+++ b/libebl/eblbackendname.c
@@ -36,8 +36,7 @@
const char *
-ebl_backend_name (ebl)
- Ebl *ebl;
+ebl_backend_name (Ebl *ebl)
{
return ebl != NULL ? ebl->emulation : gettext ("No backend");
}
diff --git a/libebl/eblbsspltp.c b/libebl/eblbsspltp.c
index 95a5d8af..24c4a08b 100644
--- a/libebl/eblbsspltp.c
+++ b/libebl/eblbsspltp.c
@@ -35,8 +35,7 @@
bool
-ebl_bss_plt_p (ebl)
- Ebl *ebl;
+ebl_bss_plt_p (Ebl *ebl)
{
return ebl == NULL ? false : ebl->bss_plt_p (ebl->elf);
}
diff --git a/libebl/eblcheckobjattr.c b/libebl/eblcheckobjattr.c
index b0481d2f..b590a039 100644
--- a/libebl/eblcheckobjattr.c
+++ b/libebl/eblcheckobjattr.c
@@ -35,13 +35,9 @@
bool
-ebl_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)
- Ebl *ebl;
- const char *vendor;
- int tag;
- uint64_t value;
- const char **tag_name;
- const char **value_name;
+ebl_check_object_attribute (Ebl *ebl, const char *vendor, int tag,
+ uint64_t value, const char **tag_name,
+ const char **value_name)
{
if (ebl->check_object_attribute (ebl, vendor, tag, value,
tag_name, value_name))
diff --git a/libebl/eblcopyrelocp.c b/libebl/eblcopyrelocp.c
index 702f8c7c..0458c4f7 100644
--- a/libebl/eblcopyrelocp.c
+++ b/libebl/eblcopyrelocp.c
@@ -35,9 +35,7 @@
bool
-ebl_copy_reloc_p (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_copy_reloc_p (Ebl *ebl, int reloc)
{
return ebl->copy_reloc_p (reloc);
}
diff --git a/libebl/eblcorenote.c b/libebl/eblcorenote.c
index 2a79278d..783f9815 100644
--- a/libebl/eblcorenote.c
+++ b/libebl/eblcorenote.c
@@ -40,16 +40,10 @@
int
-ebl_core_note (ebl, nhdr, name,
- regs_offset, nregloc, reglocs, nitems, items)
- Ebl *ebl;
- const GElf_Nhdr *nhdr;
- const char *name;
- GElf_Word *regs_offset;
- size_t *nregloc;
- const Ebl_Register_Location **reglocs;
- size_t *nitems;
- const Ebl_Core_Item **items;
+ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr, const char *name,
+ GElf_Word *regs_offset, size_t *nregloc,
+ const Ebl_Register_Location **reglocs, size_t *nitems,
+ const Ebl_Core_Item **items)
{
int result = ebl->core_note (nhdr, name,
regs_offset, nregloc, reglocs, nitems, items);
diff --git a/libebl/eblcorenotetypename.c b/libebl/eblcorenotetypename.c
index b6db6cd8..826f9a1b 100644
--- a/libebl/eblcorenotetypename.c
+++ b/libebl/eblcorenotetypename.c
@@ -36,11 +36,7 @@
#include <libeblP.h>
const char *
-ebl_core_note_type_name (ebl, type, buf, len)
- Ebl *ebl;
- uint32_t type;
- char *buf;
- size_t len;
+ebl_core_note_type_name (Ebl *ebl, uint32_t type, char *buf, size_t len)
{
const char *res = ebl->core_note_type_name (type, buf, len);
diff --git a/libebl/ebldebugscnp.c b/libebl/ebldebugscnp.c
index 01a56754..2964fdb6 100644
--- a/libebl/ebldebugscnp.c
+++ b/libebl/ebldebugscnp.c
@@ -36,9 +36,7 @@
bool
-ebl_debugscn_p (ebl, name)
- Ebl *ebl;
- const char *name;
+ebl_debugscn_p (Ebl *ebl, const char *name)
{
return name != NULL && ebl->debugscn_p (name);
}
diff --git a/libebl/ebldynamictagcheck.c b/libebl/ebldynamictagcheck.c
index 17acee04..c2311ccd 100644
--- a/libebl/ebldynamictagcheck.c
+++ b/libebl/ebldynamictagcheck.c
@@ -36,9 +36,7 @@
bool
-ebl_dynamic_tag_check (ebl, tag)
- Ebl *ebl;
- int64_t tag;
+ebl_dynamic_tag_check (Ebl *ebl, int64_t tag)
{
bool res = ebl != NULL ? ebl->dynamic_tag_check (tag) : false;
diff --git a/libebl/ebldynamictagname.c b/libebl/ebldynamictagname.c
index 6b09ee64..3aaccd0d 100644
--- a/libebl/ebldynamictagname.c
+++ b/libebl/ebldynamictagname.c
@@ -37,11 +37,7 @@
const char *
-ebl_dynamic_tag_name (ebl, tag, buf, len)
- Ebl *ebl;
- int64_t tag;
- char *buf;
- size_t len;
+ebl_dynamic_tag_name (Ebl *ebl, int64_t tag, char *buf, size_t len)
{
const char *res = ebl != NULL ? ebl->dynamic_tag_name (tag, buf, len) : NULL;
diff --git a/libebl/eblelfclass.c b/libebl/eblelfclass.c
index 62d12836..2ffef304 100644
--- a/libebl/eblelfclass.c
+++ b/libebl/eblelfclass.c
@@ -35,8 +35,7 @@
int
-ebl_get_elfclass (ebl)
- Ebl *ebl;
+ebl_get_elfclass (Ebl *ebl)
{
return ebl->class;
}
diff --git a/libebl/eblelfdata.c b/libebl/eblelfdata.c
index b09dbb5c..072924b6 100644
--- a/libebl/eblelfdata.c
+++ b/libebl/eblelfdata.c
@@ -35,8 +35,7 @@
int
-ebl_get_elfdata (ebl)
- Ebl *ebl;
+ebl_get_elfdata (Ebl *ebl)
{
return ebl->data;
}
diff --git a/libebl/eblelfmachine.c b/libebl/eblelfmachine.c
index cd961e7b..c2c86275 100644
--- a/libebl/eblelfmachine.c
+++ b/libebl/eblelfmachine.c
@@ -35,8 +35,7 @@
int
-ebl_get_elfmachine (ebl)
- Ebl *ebl;
+ebl_get_elfmachine (Ebl *ebl)
{
return ebl->machine;
}
diff --git a/libebl/eblgotpcreloccheck.c b/libebl/eblgotpcreloccheck.c
index 55625de3..7c9c079c 100644
--- a/libebl/eblgotpcreloccheck.c
+++ b/libebl/eblgotpcreloccheck.c
@@ -36,9 +36,7 @@
bool
-ebl_gotpc_reloc_check (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_gotpc_reloc_check (Ebl *ebl, int reloc)
{
return ebl != NULL ? ebl->gotpc_reloc_check (ebl->elf, reloc) : false;
}
diff --git a/libebl/eblmachineflagcheck.c b/libebl/eblmachineflagcheck.c
index d6d79318..e98b600e 100644
--- a/libebl/eblmachineflagcheck.c
+++ b/libebl/eblmachineflagcheck.c
@@ -35,9 +35,7 @@
bool
-ebl_machine_flag_check (ebl, flags)
- Ebl *ebl;
- Elf64_Word flags;
+ebl_machine_flag_check (Ebl *ebl, Elf64_Word flags)
{
return ebl != NULL ? ebl->machine_flag_check (flags) : (flags == 0);
}
diff --git a/libebl/eblmachineflagname.c b/libebl/eblmachineflagname.c
index e392f5a4..6079a613 100644
--- a/libebl/eblmachineflagname.c
+++ b/libebl/eblmachineflagname.c
@@ -37,11 +37,7 @@
const char *
-ebl_machine_flag_name (ebl, flags, buf, len)
- Ebl *ebl;
- Elf64_Word flags;
- char *buf;
- size_t len;
+ebl_machine_flag_name (Ebl *ebl, Elf64_Word flags, char *buf, size_t len)
{
const char *res;
diff --git a/libebl/eblmachinesectionflagcheck.c b/libebl/eblmachinesectionflagcheck.c
index 671eb8c5..a73b230d 100644
--- a/libebl/eblmachinesectionflagcheck.c
+++ b/libebl/eblmachinesectionflagcheck.c
@@ -34,9 +34,7 @@
bool
-ebl_machine_section_flag_check (ebl, flags)
- Ebl *ebl;
- GElf_Xword flags;
+ebl_machine_section_flag_check (Ebl *ebl, GElf_Xword flags)
{
return ebl != NULL ? ebl->machine_section_flag_check (flags) : (flags == 0);
}
diff --git a/libebl/eblnonerelocp.c b/libebl/eblnonerelocp.c
index 07c6b0e3..e51a3b00 100644
--- a/libebl/eblnonerelocp.c
+++ b/libebl/eblnonerelocp.c
@@ -35,9 +35,7 @@
bool
-ebl_none_reloc_p (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_none_reloc_p (Ebl *ebl, int reloc)
{
return ebl->none_reloc_p (reloc);
}
diff --git a/libebl/eblobjecttypename.c b/libebl/eblobjecttypename.c
index 1a2c8e87..b0fd3724 100644
--- a/libebl/eblobjecttypename.c
+++ b/libebl/eblobjecttypename.c
@@ -36,11 +36,7 @@
const char *
-ebl_object_type_name (ebl, object, buf, len)
- Ebl *ebl;
- int object;
- char *buf;
- size_t len;
+ebl_object_type_name (Ebl *ebl, int object, char *buf, size_t len)
{
const char *res;
diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c
index b9bf1c0b..fa1eb93a 100644
--- a/libebl/eblobjnote.c
+++ b/libebl/eblobjnote.c
@@ -39,12 +39,8 @@
void
-ebl_object_note (ebl, name, type, descsz, desc)
- Ebl *ebl;
- const char *name;
- uint32_t type;
- uint32_t descsz;
- const char *desc;
+ebl_object_note (Ebl *ebl, const char *name, uint32_t type,
+ uint32_t descsz, const char *desc)
{
if (! ebl->object_note (name, type, descsz, desc))
/* The machine specific function did not know this type. */
diff --git a/libebl/eblobjnotetypename.c b/libebl/eblobjnotetypename.c
index 8a70e61f..8e2e329b 100644
--- a/libebl/eblobjnotetypename.c
+++ b/libebl/eblobjnotetypename.c
@@ -38,12 +38,8 @@
const char *
-ebl_object_note_type_name (ebl, name, type, buf, len)
- Ebl *ebl;
- const char *name;
- uint32_t type;
- char *buf;
- size_t len;
+ebl_object_note_type_name (Ebl *ebl, const char *name, uint32_t type,
+ char *buf, size_t len)
{
const char *res = ebl->object_note_type_name (name, type, buf, len);
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index 02b24d3f..b3014005 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -254,10 +254,7 @@ fill_defaults (Ebl *result)
/* Find an appropriate backend for the file associated with ELF. */
static Ebl *
-openbackend (elf, emulation, machine)
- Elf *elf;
- const char *emulation;
- GElf_Half machine;
+openbackend (Elf *elf, const char *emulation, GElf_Half machine)
{
Ebl *result;
size_t cnt;
@@ -397,8 +394,7 @@ openbackend (elf, emulation, machine)
/* Find an appropriate backend for the file associated with ELF. */
Ebl *
-ebl_openbackend (elf)
- Elf *elf;
+ebl_openbackend (Elf *elf)
{
GElf_Ehdr ehdr_mem;
GElf_Ehdr *ehdr;
diff --git a/libebl/eblosabiname.c b/libebl/eblosabiname.c
index 3ea6f562..b60f2af4 100644
--- a/libebl/eblosabiname.c
+++ b/libebl/eblosabiname.c
@@ -36,11 +36,7 @@
const char *
-ebl_osabi_name (ebl, osabi, buf, len)
- Ebl *ebl;
- int osabi;
- char *buf;
- size_t len;
+ebl_osabi_name (Ebl *ebl, int osabi, char *buf, size_t len)
{
const char *res = ebl != NULL ? ebl->osabi_name (osabi, buf, len) : NULL;
diff --git a/libebl/eblreginfo.c b/libebl/eblreginfo.c
index f213b4a2..acc48495 100644
--- a/libebl/eblreginfo.c
+++ b/libebl/eblreginfo.c
@@ -35,15 +35,9 @@
ssize_t
-ebl_register_info (ebl, regno, name, namelen, prefix, setname, bits, type)
- Ebl *ebl;
- int regno;
- char *name;
- size_t namelen;
- const char **prefix;
- const char **setname;
- int *bits;
- int *type;
+ebl_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
+ const char **prefix, const char **setname,
+ int *bits, int *type)
{
return ebl == NULL ? -1 : ebl->register_info (ebl, regno, name, namelen,
prefix, setname, bits, type);
diff --git a/libebl/eblrelativerelocp.c b/libebl/eblrelativerelocp.c
index 297caec2..51f5dce2 100644
--- a/libebl/eblrelativerelocp.c
+++ b/libebl/eblrelativerelocp.c
@@ -35,9 +35,7 @@
bool
-ebl_relative_reloc_p (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_relative_reloc_p (Ebl *ebl, int reloc)
{
return ebl->relative_reloc_p (reloc);
}
diff --git a/libebl/eblrelocsimpletype.c b/libebl/eblrelocsimpletype.c
index 085fc931..9bd29285 100644
--- a/libebl/eblrelocsimpletype.c
+++ b/libebl/eblrelocsimpletype.c
@@ -34,9 +34,7 @@
Elf_Type
-ebl_reloc_simple_type (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_reloc_simple_type (Ebl *ebl, int reloc)
{
return ebl != NULL ? ebl->reloc_simple_type (ebl, reloc) : ELF_T_NUM;
}
diff --git a/libebl/eblreloctypecheck.c b/libebl/eblreloctypecheck.c
index e322ace0..80e67ef7 100644
--- a/libebl/eblreloctypecheck.c
+++ b/libebl/eblreloctypecheck.c
@@ -35,9 +35,7 @@
bool
-ebl_reloc_type_check (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_reloc_type_check (Ebl *ebl, int reloc)
{
return ebl != NULL ? ebl->reloc_type_check (reloc) : false;
}
diff --git a/libebl/eblreloctypename.c b/libebl/eblreloctypename.c
index fb391019..e53ec0c0 100644
--- a/libebl/eblreloctypename.c
+++ b/libebl/eblreloctypename.c
@@ -36,11 +36,7 @@
const char *
-ebl_reloc_type_name (ebl, reloc, buf, len)
- Ebl *ebl;
- int reloc;
- char *buf;
- size_t len;
+ebl_reloc_type_name (Ebl *ebl, int reloc, char *buf, size_t len)
{
const char *res;
diff --git a/libebl/eblrelocvaliduse.c b/libebl/eblrelocvaliduse.c
index 62c4ae7c..f0bed345 100644
--- a/libebl/eblrelocvaliduse.c
+++ b/libebl/eblrelocvaliduse.c
@@ -35,9 +35,7 @@
bool
-ebl_reloc_valid_use (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_reloc_valid_use (Ebl *ebl, int reloc)
{
return ebl != NULL ? ebl->reloc_valid_use (ebl->elf, reloc) : false;
}
diff --git a/libebl/eblretval.c b/libebl/eblretval.c
index 056a5493..7c039824 100644
--- a/libebl/eblretval.c
+++ b/libebl/eblretval.c
@@ -35,10 +35,8 @@
int
-ebl_return_value_location (ebl, functypedie, locops)
- Ebl *ebl;
- Dwarf_Die *functypedie;
- const Dwarf_Op **locops;
+ebl_return_value_location (Ebl *ebl, Dwarf_Die *functypedie,
+ const Dwarf_Op **locops)
{
return ebl == NULL ? -1 : ebl->return_value_location (functypedie, locops);
}
diff --git a/libebl/eblsectionname.c b/libebl/eblsectionname.c
index 81c7add5..21c537ff 100644
--- a/libebl/eblsectionname.c
+++ b/libebl/eblsectionname.c
@@ -36,14 +36,8 @@
const char *
-ebl_section_name (ebl, section, xsection, buf, len, scnnames, shnum)
- Ebl *ebl;
- int section;
- int xsection;
- char *buf;
- size_t len;
- const char *scnnames[];
- size_t shnum;
+ebl_section_name (Ebl *ebl, int section, int xsection, char *buf, size_t len,
+ const char *scnnames[], size_t shnum)
{
const char *res = ebl != NULL ? ebl->section_name (section, xsection,
buf, len) : NULL;
diff --git a/libebl/eblsectiontypename.c b/libebl/eblsectiontypename.c
index 3a30cd63..5dc1ec6d 100644
--- a/libebl/eblsectiontypename.c
+++ b/libebl/eblsectiontypename.c
@@ -36,11 +36,7 @@
const char *
-ebl_section_type_name (ebl, section, buf, len)
- Ebl *ebl;
- int section;
- char *buf;
- size_t len;
+ebl_section_type_name (Ebl *ebl, int section, char *buf, size_t len)
{
const char *res = ebl->section_type_name (section, buf, len);
diff --git a/libebl/eblsegmenttypename.c b/libebl/eblsegmenttypename.c
index 3cad66e1..14eda76e 100644
--- a/libebl/eblsegmenttypename.c
+++ b/libebl/eblsegmenttypename.c
@@ -36,11 +36,7 @@
const char *
-ebl_segment_type_name (ebl, segment, buf, len)
- Ebl *ebl;
- int segment;
- char *buf;
- size_t len;
+ebl_segment_type_name (Ebl *ebl, int segment, char *buf, size_t len)
{
const char *res;
diff --git a/libebl/eblshflagscombine.c b/libebl/eblshflagscombine.c
index 87625f87..4deaaaac 100644
--- a/libebl/eblshflagscombine.c
+++ b/libebl/eblshflagscombine.c
@@ -35,10 +35,7 @@
GElf_Word
-ebl_sh_flags_combine (ebl, flags1, flags2)
- Ebl *ebl;
- GElf_Word flags1;
- GElf_Word flags2;
+ebl_sh_flags_combine (Ebl *ebl, GElf_Word flags1, GElf_Word flags2)
{
return ebl->sh_flags_combine (flags1, flags2);
}
diff --git a/libebl/eblsymbolbindingname.c b/libebl/eblsymbolbindingname.c
index fd5bfda5..97974253 100644
--- a/libebl/eblsymbolbindingname.c
+++ b/libebl/eblsymbolbindingname.c
@@ -36,11 +36,7 @@
const char *
-ebl_symbol_binding_name (ebl, binding, buf, len)
- Ebl *ebl;
- int binding;
- char *buf;
- size_t len;
+ebl_symbol_binding_name (Ebl *ebl, int binding, char *buf, size_t len)
{
const char *res;
diff --git a/libebl/eblsymboltypename.c b/libebl/eblsymboltypename.c
index 4e653d26..09fa8748 100644
--- a/libebl/eblsymboltypename.c
+++ b/libebl/eblsymboltypename.c
@@ -36,11 +36,7 @@
const char *
-ebl_symbol_type_name (ebl, symbol, buf, len)
- Ebl *ebl;
- int symbol;
- char *buf;
- size_t len;
+ebl_symbol_type_name (Ebl *ebl, int symbol, char *buf, size_t len)
{
const char *res;
diff --git a/libebl/eblsysvhashentrysize.c b/libebl/eblsysvhashentrysize.c
index f966646a..20494313 100644
--- a/libebl/eblsysvhashentrysize.c
+++ b/libebl/eblsysvhashentrysize.c
@@ -35,8 +35,7 @@
int
-ebl_sysvhash_entrysize (ebl)
- Ebl *ebl;
+ebl_sysvhash_entrysize (Ebl *ebl)
{
return ebl->sysvhash_entrysize;
}
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 6fba0640..193d1267 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-06-22 Mark Wielaard <mjw@redhat.com>
* dl-hash.h: Update from glibc.
diff --git a/libelf/elf32_checksum.c b/libelf/elf32_checksum.c
index 4c598563..f9dfccb2 100644
--- a/libelf/elf32_checksum.c
+++ b/libelf/elf32_checksum.c
@@ -1,5 +1,5 @@
/* Compute simple checksum from permanent parts of the ELF file.
- Copyright (C) 2002, 2003, 2004, 2005, 2009 Red Hat, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2009, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -51,8 +51,7 @@
long int
-elfw2(LIBELFBITS,checksum) (elf)
- Elf *elf;
+elfw2(LIBELFBITS,checksum) (Elf *elf)
{
size_t shstrndx;
Elf_Scn *scn;
diff --git a/libelf/elf32_fsize.c b/libelf/elf32_fsize.c
index d7496fa3..fddae91e 100644
--- a/libelf/elf32_fsize.c
+++ b/libelf/elf32_fsize.c
@@ -1,5 +1,5 @@
/* Return the size of an object file type.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -40,10 +40,7 @@
size_t
-elfw2(LIBELFBITS, fsize) (type, count, version)
- Elf_Type type;
- size_t count;
- unsigned int version;
+elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int version)
{
/* We do not have differences between file and memory sizes. Better
not since otherwise `mmap' would not work. */
diff --git a/libelf/elf32_getehdr.c b/libelf/elf32_getehdr.c
index ee0a2e0f..2b9ad1fa 100644
--- a/libelf/elf32_getehdr.c
+++ b/libelf/elf32_getehdr.c
@@ -1,5 +1,5 @@
/* Get ELF header.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -42,9 +42,7 @@
static ElfW2(LIBELFBITS,Ehdr) *
-getehdr_impl (elf, wrlock)
- Elf *elf;
- int wrlock;
+getehdr_impl (Elf *elf, int wrlock)
{
if (elf == NULL)
return NULL;
@@ -77,15 +75,13 @@ getehdr_impl (elf, wrlock)
}
ElfW2(LIBELFBITS,Ehdr) *
-__elfw2(LIBELFBITS,getehdr_wrlock) (elf)
- Elf *elf;
+__elfw2(LIBELFBITS,getehdr_wrlock) (Elf *elf)
{
return getehdr_impl (elf, 1);
}
ElfW2(LIBELFBITS,Ehdr) *
-elfw2(LIBELFBITS,getehdr) (elf)
- Elf *elf;
+elfw2(LIBELFBITS,getehdr) (Elf *elf)
{
ElfW2(LIBELFBITS,Ehdr) *result;
if (elf == NULL)
diff --git a/libelf/elf32_getphdr.c b/libelf/elf32_getphdr.c
index 38e489dc..99b4ac09 100644
--- a/libelf/elf32_getphdr.c
+++ b/libelf/elf32_getphdr.c
@@ -1,5 +1,5 @@
/* Get ELF program header table.
- Copyright (C) 1998-2010, 2014 Red Hat, Inc.
+ Copyright (C) 1998-2010, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -46,8 +46,7 @@
#endif
ElfW2(LIBELFBITS,Phdr) *
-__elfw2(LIBELFBITS,getphdr_wrlock) (elf)
- Elf *elf;
+__elfw2(LIBELFBITS,getphdr_wrlock) (Elf *elf)
{
ElfW2(LIBELFBITS,Phdr) *result;
@@ -237,8 +236,7 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf)
}
ElfW2(LIBELFBITS,Phdr) *
-elfw2(LIBELFBITS,getphdr) (elf)
- Elf *elf;
+elfw2(LIBELFBITS,getphdr) (Elf *elf)
{
ElfW2(LIBELFBITS,Phdr) *result;
diff --git a/libelf/elf32_getshdr.c b/libelf/elf32_getshdr.c
index ee1aed8f..a5fdb547 100644
--- a/libelf/elf32_getshdr.c
+++ b/libelf/elf32_getshdr.c
@@ -1,5 +1,5 @@
/* Return section header.
- Copyright (C) 1998-2002, 2005, 2007, 2009, 2012, 2014 Red Hat, Inc.
+ Copyright (C) 1998-2002, 2005, 2007, 2009, 2012, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -243,8 +243,7 @@ scn_valid (Elf_Scn *scn)
}
ElfW2(LIBELFBITS,Shdr) *
-__elfw2(LIBELFBITS,getshdr_rdlock) (scn)
- Elf_Scn *scn;
+__elfw2(LIBELFBITS,getshdr_rdlock) (Elf_Scn *scn)
{
ElfW2(LIBELFBITS,Shdr) *result;
@@ -265,8 +264,7 @@ __elfw2(LIBELFBITS,getshdr_rdlock) (scn)
}
ElfW2(LIBELFBITS,Shdr) *
-__elfw2(LIBELFBITS,getshdr_wrlock) (scn)
- Elf_Scn *scn;
+__elfw2(LIBELFBITS,getshdr_wrlock) (Elf_Scn *scn)
{
ElfW2(LIBELFBITS,Shdr) *result;
@@ -281,8 +279,7 @@ __elfw2(LIBELFBITS,getshdr_wrlock) (scn)
}
ElfW2(LIBELFBITS,Shdr) *
-elfw2(LIBELFBITS,getshdr) (scn)
- Elf_Scn *scn;
+elfw2(LIBELFBITS,getshdr) (Elf_Scn *scn)
{
ElfW2(LIBELFBITS,Shdr) *result;
diff --git a/libelf/elf32_newehdr.c b/libelf/elf32_newehdr.c
index 4b547bcc..775d1157 100644
--- a/libelf/elf32_newehdr.c
+++ b/libelf/elf32_newehdr.c
@@ -1,5 +1,5 @@
/* Create new ELF header.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -42,8 +42,7 @@
ElfW2(LIBELFBITS,Ehdr) *
-elfw2(LIBELFBITS,newehdr) (elf)
- Elf *elf;
+elfw2(LIBELFBITS,newehdr) (Elf *elf)
{
ElfW2(LIBELFBITS,Ehdr) *result;
diff --git a/libelf/elf32_newphdr.c b/libelf/elf32_newphdr.c
index f89153b4..4aa72137 100644
--- a/libelf/elf32_newphdr.c
+++ b/libelf/elf32_newphdr.c
@@ -1,5 +1,5 @@
/* Create new ELF program header table.
- Copyright (C) 1999-2010, 2014 Red Hat, Inc.
+ Copyright (C) 1999-2010, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -43,9 +43,7 @@
ElfW2(LIBELFBITS,Phdr) *
-elfw2(LIBELFBITS,newphdr) (elf, count)
- Elf *elf;
- size_t count;
+elfw2(LIBELFBITS,newphdr) (Elf *elf, size_t count)
{
ElfW2(LIBELFBITS,Phdr) *result;
diff --git a/libelf/elf32_offscn.c b/libelf/elf32_offscn.c
index a1ff6d40..9e757c84 100644
--- a/libelf/elf32_offscn.c
+++ b/libelf/elf32_offscn.c
@@ -1,5 +1,5 @@
/* Get section at specific index.
- Copyright (C) 2005, 2008 Red Hat, Inc.
+ Copyright (C) 2005, 2008, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2005.
@@ -43,9 +43,7 @@
Elf_Scn *
-elfw2(LIBELFBITS,offscn) (elf, offset)
- Elf *elf;
- ElfW2(LIBELFBITS,Off) offset;
+elfw2(LIBELFBITS,offscn) (Elf *elf, ElfW2(LIBELFBITS,Off) offset)
{
if (elf == NULL)
return NULL;
diff --git a/libelf/elf32_xlatetof.c b/libelf/elf32_xlatetof.c
index 27a973ec..ac4eaf40 100644
--- a/libelf/elf32_xlatetof.c
+++ b/libelf/elf32_xlatetof.c
@@ -1,5 +1,5 @@
/* Convert from memory to file representation.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -43,10 +43,8 @@
Elf_Data *
-elfw2(LIBELFBITS, xlatetof) (dest, src, encode)
- Elf_Data *dest;
- const Elf_Data *src;
- unsigned int encode;
+elfw2(LIBELFBITS, xlatetof) (Elf_Data *dest, const Elf_Data *src,
+ unsigned int encode)
{
/* First test whether the input data is really suitable for this
type. This means, whether there is an integer number of records.
diff --git a/libelf/elf32_xlatetom.c b/libelf/elf32_xlatetom.c
index 368df078..13cd485d 100644
--- a/libelf/elf32_xlatetom.c
+++ b/libelf/elf32_xlatetom.c
@@ -1,5 +1,5 @@
/* Convert from file to memory representation.
- Copyright (C) 1998, 1999, 2000, 2002, 2012 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2012, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -43,10 +43,8 @@
Elf_Data *
-elfw2(LIBELFBITS, xlatetom) (dest, src, encode)
- Elf_Data *dest;
- const Elf_Data *src;
- unsigned int encode;
+elfw2(LIBELFBITS, xlatetom) (Elf_Data *dest, const Elf_Data *src,
+ unsigned int encode)
{
/* First test whether the input data is really suitable for this
type. This means, whether there is an integer number of records.
diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
index f002ebf0..213b5c0b 100644
--- a/libelf/elf_begin.c
+++ b/libelf/elf_begin.c
@@ -775,8 +775,7 @@ read_long_names (Elf *elf)
/* Read the next archive header. */
int
internal_function
-__libelf_next_arhdr_wrlock (elf)
- Elf *elf;
+__libelf_next_arhdr_wrlock (Elf *elf)
{
struct ar_hdr *ar_hdr;
Elf_Arhdr *elf_ar_hdr;
@@ -1043,10 +1042,7 @@ write_file (int fd, Elf_Cmd cmd)
/* Return a descriptor for the file belonging to FILDES. */
Elf *
-elf_begin (fildes, cmd, ref)
- int fildes;
- Elf_Cmd cmd;
- Elf *ref;
+elf_begin (int fildes, Elf_Cmd cmd, Elf *ref)
{
Elf *retval;
@@ -1067,7 +1063,7 @@ elf_begin (fildes, cmd, ref)
return NULL;
}
- Elf *lock_dup_elf ()
+ Elf *lock_dup_elf (void)
{
/* We need wrlock to dup an archive. */
if (ref->kind == ELF_K_AR)
diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c
index a3c58051..ab13ffb6 100644
--- a/libelf/elf_cntl.c
+++ b/libelf/elf_cntl.c
@@ -1,5 +1,5 @@
/* Control an ELF file desrciptor.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -37,9 +37,7 @@
int
-elf_cntl (elf, cmd)
- Elf *elf;
- Elf_Cmd cmd;
+elf_cntl (Elf *elf, Elf_Cmd cmd)
{
int result = 0;
diff --git a/libelf/elf_end.c b/libelf/elf_end.c
index d4ae0517..7ea876c3 100644
--- a/libelf/elf_end.c
+++ b/libelf/elf_end.c
@@ -1,5 +1,5 @@
/* Free resources associated with Elf descriptor.
- Copyright (C) 1998,1999,2000,2001,2002,2004,2005,2007 Red Hat, Inc.
+ Copyright (C) 1998,1999,2000,2001,2002,2004,2005,2007,2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -40,8 +40,7 @@
int
-elf_end (elf)
- Elf *elf;
+elf_end (Elf *elf)
{
Elf *parent;
diff --git a/libelf/elf_error.c b/libelf/elf_error.c
index aa7f9173..d6e5183f 100644
--- a/libelf/elf_error.c
+++ b/libelf/elf_error.c
@@ -1,5 +1,5 @@
/* Error handling in libelf.
- Copyright (C) 1998-2010 Red Hat, Inc.
+ Copyright (C) 1998-2010, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -283,16 +283,14 @@ static const uint_fast16_t msgidx[ELF_E_NUM] =
void
-__libelf_seterrno (value)
- int value;
+__libelf_seterrno (int value)
{
global_error = value >= 0 && value < nmsgidx ? value : ELF_E_UNKNOWN_ERROR;
}
const char *
-elf_errmsg (error)
- int error;
+elf_errmsg (int error)
{
int last_error = global_error;
diff --git a/libelf/elf_fill.c b/libelf/elf_fill.c
index 174ab45c..6ebdf63a 100644
--- a/libelf/elf_fill.c
+++ b/libelf/elf_fill.c
@@ -1,5 +1,5 @@
/* Set fill byte used when constructing ELF objects.
- Copyright (C) 1998, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -40,8 +40,7 @@ int __libelf_fill_byte;
void
-elf_fill (fill)
- int fill;
+elf_fill (int fill)
{
__libelf_fill_byte = fill;
}
diff --git a/libelf/elf_flagdata.c b/libelf/elf_flagdata.c
index ace8cc52..cd2b1237 100644
--- a/libelf/elf_flagdata.c
+++ b/libelf/elf_flagdata.c
@@ -1,5 +1,5 @@
/* Manipulate ELF data flag.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,10 +38,7 @@
unsigned int
-elf_flagdata (data, cmd, flags)
- Elf_Data *data;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagdata (Elf_Data *data, Elf_Cmd cmd, unsigned int flags)
{
Elf_Data_Scn *data_scn;
unsigned int result;
diff --git a/libelf/elf_flagehdr.c b/libelf/elf_flagehdr.c
index d3a320b9..a98276d5 100644
--- a/libelf/elf_flagehdr.c
+++ b/libelf/elf_flagehdr.c
@@ -1,5 +1,5 @@
/* Manipulate ELF header flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -38,10 +38,7 @@
unsigned int
-elf_flagehdr (elf, cmd, flags)
- Elf *elf;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagehdr (Elf *elf, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
diff --git a/libelf/elf_flagelf.c b/libelf/elf_flagelf.c
index b34bd4f8..bd90a21f 100644
--- a/libelf/elf_flagelf.c
+++ b/libelf/elf_flagelf.c
@@ -1,5 +1,5 @@
/* Manipulate ELF file flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -38,10 +38,7 @@
unsigned int
-elf_flagelf (elf, cmd, flags)
- Elf *elf;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagelf (Elf *elf, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
diff --git a/libelf/elf_flagphdr.c b/libelf/elf_flagphdr.c
index 2a589cc9..0682d1f4 100644
--- a/libelf/elf_flagphdr.c
+++ b/libelf/elf_flagphdr.c
@@ -1,5 +1,5 @@
/* Manipulate ELF program header flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -38,10 +38,7 @@
unsigned int
-elf_flagphdr (elf, cmd, flags)
- Elf *elf;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagphdr (Elf *elf, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
diff --git a/libelf/elf_flagscn.c b/libelf/elf_flagscn.c
index 3ff826c6..2164a8c9 100644
--- a/libelf/elf_flagscn.c
+++ b/libelf/elf_flagscn.c
@@ -1,5 +1,5 @@
/* Manipulate ELF section flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -38,10 +38,7 @@
unsigned int
-elf_flagscn (scn, cmd, flags)
- Elf_Scn *scn;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagscn (Elf_Scn *scn, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
diff --git a/libelf/elf_flagshdr.c b/libelf/elf_flagshdr.c
index 8d797af6..febf4abf 100644
--- a/libelf/elf_flagshdr.c
+++ b/libelf/elf_flagshdr.c
@@ -1,5 +1,5 @@
/* Manipulate ELF section header flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -38,10 +38,7 @@
unsigned int
-elf_flagshdr (scn, cmd, flags)
- Elf_Scn *scn;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagshdr (Elf_Scn *scn, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
diff --git a/libelf/elf_getarhdr.c b/libelf/elf_getarhdr.c
index f8b36b8b..509f1da5 100644
--- a/libelf/elf_getarhdr.c
+++ b/libelf/elf_getarhdr.c
@@ -1,5 +1,5 @@
/* Read header of next archive member.
- Copyright (C) 1998, 1999, 2000, 2002, 2008 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2008, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -39,8 +39,7 @@
Elf_Arhdr *
-elf_getarhdr (elf)
- Elf *elf;
+elf_getarhdr (Elf *elf)
{
if (elf == NULL)
return NULL;
diff --git a/libelf/elf_getaroff.c b/libelf/elf_getaroff.c
index 62da34df..5b59203f 100644
--- a/libelf/elf_getaroff.c
+++ b/libelf/elf_getaroff.c
@@ -1,5 +1,5 @@
/* Return offset in archive for current file ELF.
- Copyright (C) 2005, 2008 Red Hat, Inc.
+ Copyright (C) 2005, 2008, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2005.
@@ -39,8 +39,7 @@
off_t
-elf_getaroff (elf)
- Elf *elf;
+elf_getaroff (Elf *elf)
{
/* Be gratious, the specs demand it. */
if (elf == NULL || elf->parent == NULL)
diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c
index 83242441..1ab94ca8 100644
--- a/libelf/elf_getarsym.c
+++ b/libelf/elf_getarsym.c
@@ -74,9 +74,7 @@ read_number_entries (uint64_t *nump, Elf *elf, size_t *offp, bool index64_p)
}
Elf_Arsym *
-elf_getarsym (elf, ptr)
- Elf *elf;
- size_t *ptr;
+elf_getarsym (Elf *elf, size_t *ptr)
{
if (elf->kind != ELF_K_AR)
{
diff --git a/libelf/elf_getbase.c b/libelf/elf_getbase.c
index ff0feb40..8ec5f87e 100644
--- a/libelf/elf_getbase.c
+++ b/libelf/elf_getbase.c
@@ -1,5 +1,5 @@
/* Return offset of first byte for the object.
- Copyright (C) 1998, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,8 +38,7 @@
off_t
-elf_getbase (elf)
- Elf *elf;
+elf_getbase (Elf *elf)
{
return elf == NULL ? (off_t) -1 : elf->start_offset;
}
diff --git a/libelf/elf_getdata.c b/libelf/elf_getdata.c
index 770e0355..9a567e51 100644
--- a/libelf/elf_getdata.c
+++ b/libelf/elf_getdata.c
@@ -422,9 +422,7 @@ __libelf_set_data_list_rdlock (Elf_Scn *scn, int wrlocked)
Elf_Data *
internal_function
-__elf_getdata_rdlock (scn, data)
- Elf_Scn *scn;
- Elf_Data *data;
+__elf_getdata_rdlock (Elf_Scn *scn, Elf_Data *data)
{
Elf_Data *result = NULL;
Elf *elf;
@@ -520,9 +518,7 @@ __elf_getdata_rdlock (scn, data)
}
Elf_Data *
-elf_getdata (scn, data)
- Elf_Scn *scn;
- Elf_Data *data;
+elf_getdata (Elf_Scn *scn, Elf_Data *data)
{
Elf_Data *result;
diff --git a/libelf/elf_getdata_rawchunk.c b/libelf/elf_getdata_rawchunk.c
index 5cc11e70..51b3e3e7 100644
--- a/libelf/elf_getdata_rawchunk.c
+++ b/libelf/elf_getdata_rawchunk.c
@@ -1,5 +1,5 @@
/* Return converted data from raw chunk of ELF file.
- Copyright (C) 2007, 2014 Red Hat, Inc.
+ Copyright (C) 2007, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -41,11 +41,7 @@
#include "common.h"
Elf_Data *
-elf_getdata_rawchunk (elf, offset, size, type)
- Elf *elf;
- off64_t offset;
- size_t size;
- Elf_Type type;
+elf_getdata_rawchunk (Elf *elf, off64_t offset, size_t size, Elf_Type type)
{
if (unlikely (elf == NULL))
return NULL;
diff --git a/libelf/elf_getident.c b/libelf/elf_getident.c
index 10beeafd..5abf8c94 100644
--- a/libelf/elf_getident.c
+++ b/libelf/elf_getident.c
@@ -1,5 +1,5 @@
/* Retrieve file identification data.
- Copyright (C) 1998, 1999, 2000, 2002, 2004 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -37,9 +37,7 @@
char *
-elf_getident (elf, ptr)
- Elf *elf;
- size_t *ptr;
+elf_getident (Elf *elf, size_t *ptr)
{
/* In case this is no ELF file, the handle is invalid and we return
NULL. */
diff --git a/libelf/elf_getphdrnum.c b/libelf/elf_getphdrnum.c
index f2fad87a..fe70345d 100644
--- a/libelf/elf_getphdrnum.c
+++ b/libelf/elf_getphdrnum.c
@@ -1,5 +1,5 @@
/* Return number of program headers in the ELF file.
- Copyright (C) 2010, 2014 Red Hat, Inc.
+ Copyright (C) 2010, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -38,9 +38,7 @@
int
-__elf_getphdrnum_rdlock (elf, dst)
- Elf *elf;
- size_t *dst;
+__elf_getphdrnum_rdlock (Elf *elf, size_t *dst)
{
if (unlikely (elf->state.elf64.ehdr == NULL))
{
@@ -80,9 +78,7 @@ __elf_getphdrnum_rdlock (elf, dst)
}
int
-__elf_getphdrnum_chk_rdlock (elf, dst)
- Elf *elf;
- size_t *dst;
+__elf_getphdrnum_chk_rdlock (Elf *elf, size_t *dst)
{
int result = __elf_getphdrnum_rdlock (elf, dst);
@@ -119,9 +115,7 @@ __elf_getphdrnum_chk_rdlock (elf, dst)
}
int
-elf_getphdrnum (elf, dst)
- Elf *elf;
- size_t *dst;
+elf_getphdrnum (Elf *elf, size_t *dst)
{
int result;
diff --git a/libelf/elf_getscn.c b/libelf/elf_getscn.c
index 7c6b7dee..9f7213b4 100644
--- a/libelf/elf_getscn.c
+++ b/libelf/elf_getscn.c
@@ -1,5 +1,5 @@
/* Get section at specific index.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -39,9 +39,7 @@
Elf_Scn *
-elf_getscn (elf, idx)
- Elf *elf;
- size_t idx;
+elf_getscn (Elf *elf, size_t idx)
{
if (elf == NULL)
return NULL;
diff --git a/libelf/elf_getshdrnum.c b/libelf/elf_getshdrnum.c
index 73a3300d..4875c199 100644
--- a/libelf/elf_getshdrnum.c
+++ b/libelf/elf_getshdrnum.c
@@ -1,5 +1,5 @@
/* Return number of sections in the ELF file.
- Copyright (C) 2002, 2009 Red Hat, Inc.
+ Copyright (C) 2002, 2009, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -39,9 +39,7 @@
int
-__elf_getshdrnum_rdlock (elf, dst)
- Elf *elf;
- size_t *dst;
+__elf_getshdrnum_rdlock (Elf *elf, size_t *dst)
{
int result = 0;
int idx;
@@ -71,9 +69,7 @@ __elf_getshdrnum_rdlock (elf, dst)
}
int
-elf_getshdrnum (elf, dst)
- Elf *elf;
- size_t *dst;
+elf_getshdrnum (Elf *elf, size_t *dst)
{
int result;
diff --git a/libelf/elf_getshdrstrndx.c b/libelf/elf_getshdrstrndx.c
index 6f8d66e8..aead2fe5 100644
--- a/libelf/elf_getshdrstrndx.c
+++ b/libelf/elf_getshdrstrndx.c
@@ -1,5 +1,5 @@
/* Return section index of section header string table.
- Copyright (C) 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -43,9 +43,7 @@
int
-elf_getshdrstrndx (elf, dst)
- Elf *elf;
- size_t *dst;
+elf_getshdrstrndx (Elf *elf, size_t *dst)
{
int result = 0;
diff --git a/libelf/elf_gnu_hash.c b/libelf/elf_gnu_hash.c
index 4c21857f..5a1b8523 100644
--- a/libelf/elf_gnu_hash.c
+++ b/libelf/elf_gnu_hash.c
@@ -1,5 +1,5 @@
/* GNU-style Hash function used in ELF implementations.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
@@ -37,8 +37,7 @@
#include <dl-hash.h>
unsigned long int
-elf_gnu_hash (string)
- const char *string;
+elf_gnu_hash (const char *string)
{
uint_fast32_t h = 5381;
for (unsigned char c = *string; c != '\0'; c = *++string)
diff --git a/libelf/elf_hash.c b/libelf/elf_hash.c
index 306ebc2c..345697e1 100644
--- a/libelf/elf_hash.c
+++ b/libelf/elf_hash.c
@@ -1,5 +1,5 @@
/* Hash function used in ELF implementations.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -37,8 +37,7 @@
#include <dl-hash.h>
unsigned long int
-elf_hash (string)
- const char *string;
+elf_hash (const char *string)
{
return _dl_elf_hash (string);
}
diff --git a/libelf/elf_kind.c b/libelf/elf_kind.c
index d8ab2fdd..0fb3f0c2 100644
--- a/libelf/elf_kind.c
+++ b/libelf/elf_kind.c
@@ -1,5 +1,5 @@
/* Return the kind of file associated with the descriptor.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,8 +38,7 @@
Elf_Kind
-elf_kind (elf)
- Elf *elf;
+elf_kind (Elf *elf)
{
return elf == NULL ? ELF_K_NONE : elf->kind;
}
diff --git a/libelf/elf_memory.c b/libelf/elf_memory.c
index 08f85a12..a47f1d24 100644
--- a/libelf/elf_memory.c
+++ b/libelf/elf_memory.c
@@ -1,5 +1,5 @@
/* Create descriptor for memory region.
- Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -38,9 +38,7 @@
Elf *
-elf_memory (image, size)
- char *image;
- size_t size;
+elf_memory (char *image, size_t size)
{
if (image == NULL)
{
diff --git a/libelf/elf_ndxscn.c b/libelf/elf_ndxscn.c
index bd4bfbfd..488c4e5f 100644
--- a/libelf/elf_ndxscn.c
+++ b/libelf/elf_ndxscn.c
@@ -1,5 +1,5 @@
/* Get index of section.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,8 +38,7 @@
size_t
-elf_ndxscn (scn)
- Elf_Scn *scn;
+elf_ndxscn (Elf_Scn *scn)
{
if (scn == NULL)
return SHN_UNDEF;
diff --git a/libelf/elf_newscn.c b/libelf/elf_newscn.c
index 6e0029ed..d15a642e 100644
--- a/libelf/elf_newscn.c
+++ b/libelf/elf_newscn.c
@@ -1,5 +1,5 @@
/* Append new section.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 1998,1999,2000,2001,2002,2005,2009,2014,2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -41,8 +41,7 @@
Elf_Scn *
-elf_newscn (elf)
- Elf *elf;
+elf_newscn (Elf *elf)
{
Elf_Scn *result = NULL;
bool first = false;
diff --git a/libelf/elf_next.c b/libelf/elf_next.c
index 1f5c03c1..6edafd2e 100644
--- a/libelf/elf_next.c
+++ b/libelf/elf_next.c
@@ -1,5 +1,5 @@
/* Advance in archive to next element.
- Copyright (C) 1998-2009 Red Hat, Inc.
+ Copyright (C) 1998-2009, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -39,8 +39,7 @@
Elf_Cmd
-elf_next (elf)
- Elf *elf;
+elf_next (Elf *elf)
{
Elf *parent;
Elf_Cmd ret;
diff --git a/libelf/elf_nextscn.c b/libelf/elf_nextscn.c
index 0d2bd666..62cb8914 100644
--- a/libelf/elf_nextscn.c
+++ b/libelf/elf_nextscn.c
@@ -1,5 +1,5 @@
/* Get next section.
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -39,9 +39,7 @@
Elf_Scn *
-elf_nextscn (elf, scn)
- Elf *elf;
- Elf_Scn *scn;
+elf_nextscn (Elf *elf, Elf_Scn *scn)
{
Elf_Scn *result = NULL;
diff --git a/libelf/elf_rand.c b/libelf/elf_rand.c
index cef4e448..f1850e7b 100644
--- a/libelf/elf_rand.c
+++ b/libelf/elf_rand.c
@@ -1,5 +1,5 @@
/* Select specific element in archive.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,9 +38,7 @@
size_t
-elf_rand (elf, offset)
- Elf *elf;
- size_t offset;
+elf_rand (Elf *elf, size_t offset)
{
/* Be gratious, the specs demand it. */
if (elf == NULL || elf->kind != ELF_K_AR)
diff --git a/libelf/elf_rawdata.c b/libelf/elf_rawdata.c
index 9672652c..db28f5dc 100644
--- a/libelf/elf_rawdata.c
+++ b/libelf/elf_rawdata.c
@@ -1,5 +1,5 @@
/* Return raw section content.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -37,9 +37,7 @@
Elf_Data *
-elf_rawdata (scn, data)
- Elf_Scn *scn;
- Elf_Data *data;
+elf_rawdata (Elf_Scn *scn, Elf_Data *data)
{
if (scn == NULL || scn->elf->kind != ELF_K_ELF)
{
diff --git a/libelf/elf_rawfile.c b/libelf/elf_rawfile.c
index dd71b88b..b3837f4f 100644
--- a/libelf/elf_rawfile.c
+++ b/libelf/elf_rawfile.c
@@ -1,5 +1,5 @@
/* Retrieve uninterpreted file contents.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,9 +38,7 @@
char *
-elf_rawfile (elf, ptr)
- Elf *elf;
- size_t *ptr;
+elf_rawfile (Elf *elf, size_t *ptr)
{
char *result;
diff --git a/libelf/elf_readall.c b/libelf/elf_readall.c
index 01016188..52a0b4e5 100644
--- a/libelf/elf_readall.c
+++ b/libelf/elf_readall.c
@@ -1,5 +1,5 @@
/* Read all of the file associated with the descriptor.
- Copyright (C) 1998-2009 Red Hat, Inc.
+ Copyright (C) 1998-2009, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -66,8 +66,7 @@ set_address (Elf *elf, size_t offset)
char *
-__libelf_readall (elf)
- Elf *elf;
+__libelf_readall (Elf *elf)
{
/* Get the file. */
rwlock_wrlock (elf->lock);
diff --git a/libelf/elf_strptr.c b/libelf/elf_strptr.c
index e73bf360..c5138dc6 100644
--- a/libelf/elf_strptr.c
+++ b/libelf/elf_strptr.c
@@ -38,10 +38,7 @@
char *
-elf_strptr (elf, idx, offset)
- Elf *elf;
- size_t idx;
- size_t offset;
+elf_strptr (Elf *elf, size_t idx, size_t offset)
{
if (elf == NULL)
return NULL;
diff --git a/libelf/elf_update.c b/libelf/elf_update.c
index 9eb007bd..00f7a010 100644
--- a/libelf/elf_update.c
+++ b/libelf/elf_update.c
@@ -137,9 +137,7 @@ write_file (Elf *elf, off_t size, int change_bo, size_t shnum)
off_t
-elf_update (elf, cmd)
- Elf *elf;
- Elf_Cmd cmd;
+elf_update (Elf *elf, Elf_Cmd cmd)
{
size_t shnum;
off_t size;
diff --git a/libelf/elf_version.c b/libelf/elf_version.c
index dcb67580..7c336ff9 100644
--- a/libelf/elf_version.c
+++ b/libelf/elf_version.c
@@ -1,5 +1,5 @@
/* Coordinate ELF library and application versions.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -42,8 +42,7 @@ unsigned int __libelf_version = EV_CURRENT;
unsigned int
-elf_version (version)
- unsigned int version;
+elf_version (unsigned int version)
{
if (version == EV_NONE)
return __libelf_version;
diff --git a/libelf/gelf_checksum.c b/libelf/gelf_checksum.c
index 49067829..831c54cb 100644
--- a/libelf/gelf_checksum.c
+++ b/libelf/gelf_checksum.c
@@ -1,5 +1,5 @@
/* Convert from file to memory representation. Generic ELF version.
- Copyright (C) 2002 Red Hat, Inc.
+ Copyright (C) 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -38,8 +38,7 @@
long int
-gelf_checksum (elf)
- Elf *elf;
+gelf_checksum (Elf *elf)
{
if (elf == NULL)
return -1l;
diff --git a/libelf/gelf_fsize.c b/libelf/gelf_fsize.c
index a9d2288d..a124fa84 100644
--- a/libelf/gelf_fsize.c
+++ b/libelf/gelf_fsize.c
@@ -1,5 +1,5 @@
/* Return the size of an object file type.
- Copyright (C) 1998-2010 Red Hat, Inc.
+ Copyright (C) 1998-2010, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -79,11 +79,7 @@ const size_t __libelf_type_sizes[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] =
size_t
-gelf_fsize (elf, type, count, version)
- Elf *elf;
- Elf_Type type;
- size_t count;
- unsigned int version;
+gelf_fsize (Elf *elf, Elf_Type type, size_t count, unsigned int version)
{
/* We do not have differences between file and memory sizes. Better
not since otherwise `mmap' would not work. */
diff --git a/libelf/gelf_getauxv.c b/libelf/gelf_getauxv.c
index a2f04e7f..1591be2a 100644
--- a/libelf/gelf_getauxv.c
+++ b/libelf/gelf_getauxv.c
@@ -1,5 +1,5 @@
/* Get information from auxiliary vector at the given index.
- Copyright (C) 2007 Red Hat, Inc.
+ Copyright (C) 2007, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -38,10 +38,7 @@
GElf_auxv_t *
-gelf_getauxv (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_auxv_t *dst;
+gelf_getauxv (Elf_Data *data, int ndx, GElf_auxv_t *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
GElf_auxv_t *result = NULL;
diff --git a/libelf/gelf_getclass.c b/libelf/gelf_getclass.c
index 53759dc3..7d0924bd 100644
--- a/libelf/gelf_getclass.c
+++ b/libelf/gelf_getclass.c
@@ -1,5 +1,5 @@
/* Return the class of file associated with the descriptor.
- Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -38,8 +38,7 @@
int
-gelf_getclass (elf)
- Elf *elf;
+gelf_getclass (Elf *elf)
{
return elf == NULL || elf->kind != ELF_K_ELF ? ELFCLASSNONE : elf->class;
}
diff --git a/libelf/gelf_getdyn.c b/libelf/gelf_getdyn.c
index c366fd5d..a0090e14 100644
--- a/libelf/gelf_getdyn.c
+++ b/libelf/gelf_getdyn.c
@@ -1,5 +1,5 @@
/* Get information from dynamic table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -39,10 +39,7 @@
GElf_Dyn *
-gelf_getdyn (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Dyn *dst;
+gelf_getdyn (Elf_Data *data, int ndx, GElf_Dyn *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
GElf_Dyn *result = NULL;
diff --git a/libelf/gelf_getehdr.c b/libelf/gelf_getehdr.c
index ea83fc04..cace0ef6 100644
--- a/libelf/gelf_getehdr.c
+++ b/libelf/gelf_getehdr.c
@@ -1,5 +1,5 @@
/* Get ELF header.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -40,9 +40,7 @@
GElf_Ehdr *
-__gelf_getehdr_rdlock (elf, dest)
- Elf *elf;
- GElf_Ehdr *dest;
+__gelf_getehdr_rdlock (Elf *elf, GElf_Ehdr *dest)
{
GElf_Ehdr *result = NULL;
@@ -95,9 +93,7 @@ __gelf_getehdr_rdlock (elf, dest)
}
GElf_Ehdr *
-gelf_getehdr (elf, dest)
- Elf *elf;
- GElf_Ehdr *dest;
+gelf_getehdr (Elf *elf, GElf_Ehdr *dest)
{
GElf_Ehdr *result;
if (elf == NULL)
diff --git a/libelf/gelf_getlib.c b/libelf/gelf_getlib.c
index 880817e6..a8ac4785 100644
--- a/libelf/gelf_getlib.c
+++ b/libelf/gelf_getlib.c
@@ -1,5 +1,5 @@
/* Get library from table at the given index.
- Copyright (C) 2004, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2004, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -39,10 +39,7 @@
GElf_Lib *
-gelf_getlib (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Lib *dst;
+gelf_getlib (Elf_Data *data, int ndx, GElf_Lib *dst)
{
if (data == NULL)
return NULL;
diff --git a/libelf/gelf_getmove.c b/libelf/gelf_getmove.c
index b81d61f4..18efedcc 100644
--- a/libelf/gelf_getmove.c
+++ b/libelf/gelf_getmove.c
@@ -1,5 +1,5 @@
/* Get move structure at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -39,10 +39,7 @@
GElf_Move *
-gelf_getmove (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Move *dst;
+gelf_getmove (Elf_Data *data, int ndx, GElf_Move *dst)
{
GElf_Move *result = NULL;
Elf *elf;
diff --git a/libelf/gelf_getnote.c b/libelf/gelf_getnote.c
index 7dc82156..c75eddab 100644
--- a/libelf/gelf_getnote.c
+++ b/libelf/gelf_getnote.c
@@ -1,5 +1,5 @@
/* Get note information at the supplied offset.
- Copyright (C) 2007, 2014 Red Hat, Inc.
+ Copyright (C) 2007, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -37,12 +37,8 @@
#include "libelfP.h"
size_t
-gelf_getnote (data, offset, result, name_offset, desc_offset)
- Elf_Data *data;
- size_t offset;
- GElf_Nhdr *result;
- size_t *name_offset;
- size_t *desc_offset;
+gelf_getnote (Elf_Data *data, size_t offset, GElf_Nhdr *result,
+ size_t *name_offset, size_t *desc_offset)
{
if (data == NULL)
return 0;
diff --git a/libelf/gelf_getphdr.c b/libelf/gelf_getphdr.c
index 1a6ee62f..c719e4be 100644
--- a/libelf/gelf_getphdr.c
+++ b/libelf/gelf_getphdr.c
@@ -1,5 +1,5 @@
/* Return program header table entry.
- Copyright (C) 1998-2010 Red Hat, Inc.
+ Copyright (C) 1998-2010, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -39,10 +39,7 @@
GElf_Phdr *
-gelf_getphdr (elf, ndx, dst)
- Elf *elf;
- int ndx;
- GElf_Phdr *dst;
+gelf_getphdr (Elf *elf, int ndx, GElf_Phdr *dst)
{
GElf_Phdr *result = NULL;
diff --git a/libelf/gelf_getrel.c b/libelf/gelf_getrel.c
index 1f786ff5..309e3d37 100644
--- a/libelf/gelf_getrel.c
+++ b/libelf/gelf_getrel.c
@@ -1,5 +1,5 @@
/* Get REL relocation information at given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -38,10 +38,7 @@
GElf_Rel *
-gelf_getrel (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Rel *dst;
+gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
diff --git a/libelf/gelf_getrela.c b/libelf/gelf_getrela.c
index cead7eee..d695f659 100644
--- a/libelf/gelf_getrela.c
+++ b/libelf/gelf_getrela.c
@@ -1,5 +1,5 @@
/* Get RELA relocation information at given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -38,10 +38,7 @@
GElf_Rela *
-gelf_getrela (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Rela *dst;
+gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
diff --git a/libelf/gelf_getshdr.c b/libelf/gelf_getshdr.c
index 4a48cb6c..3858c8e1 100644
--- a/libelf/gelf_getshdr.c
+++ b/libelf/gelf_getshdr.c
@@ -1,5 +1,5 @@
/* Return section header.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,9 +38,7 @@
GElf_Shdr *
-gelf_getshdr (scn, dst)
- Elf_Scn *scn;
- GElf_Shdr *dst;
+gelf_getshdr (Elf_Scn *scn, GElf_Shdr *dst)
{
GElf_Shdr *result = NULL;
diff --git a/libelf/gelf_getsym.c b/libelf/gelf_getsym.c
index a141c2d5..01534d2c 100644
--- a/libelf/gelf_getsym.c
+++ b/libelf/gelf_getsym.c
@@ -1,5 +1,5 @@
/* Get symbol information from symbol table at the given index.
- Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -39,10 +39,7 @@
GElf_Sym *
-gelf_getsym (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Sym *dst;
+gelf_getsym (Elf_Data *data, int ndx, GElf_Sym *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
GElf_Sym *result = NULL;
diff --git a/libelf/gelf_getsyminfo.c b/libelf/gelf_getsyminfo.c
index 8d7da7f2..8360ed38 100644
--- a/libelf/gelf_getsyminfo.c
+++ b/libelf/gelf_getsyminfo.c
@@ -1,5 +1,5 @@
/* Get additional symbol information from symbol table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -39,10 +39,7 @@
GElf_Syminfo *
-gelf_getsyminfo (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Syminfo *dst;
+gelf_getsyminfo (Elf_Data *data, int ndx, GElf_Syminfo *dst)
{
GElf_Syminfo *result = NULL;
diff --git a/libelf/gelf_getsymshndx.c b/libelf/gelf_getsymshndx.c
index c19e8761..17c90fc6 100644
--- a/libelf/gelf_getsymshndx.c
+++ b/libelf/gelf_getsymshndx.c
@@ -1,6 +1,6 @@
/* Get symbol information and separate section index from symbol table
at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -40,12 +40,8 @@
GElf_Sym *
-gelf_getsymshndx (symdata, shndxdata, ndx, dst, dstshndx)
- Elf_Data *symdata;
- Elf_Data *shndxdata;
- int ndx;
- GElf_Sym *dst;
- Elf32_Word *dstshndx;
+gelf_getsymshndx (Elf_Data *symdata, Elf_Data *shndxdata, int ndx,
+ GElf_Sym *dst, Elf32_Word *dstshndx)
{
Elf_Data_Scn *symdata_scn = (Elf_Data_Scn *) symdata;
Elf_Data_Scn *shndxdata_scn = (Elf_Data_Scn *) shndxdata;
diff --git a/libelf/gelf_getverdaux.c b/libelf/gelf_getverdaux.c
index d125d9ea..739a7657 100644
--- a/libelf/gelf_getverdaux.c
+++ b/libelf/gelf_getverdaux.c
@@ -1,5 +1,5 @@
/* Get additional symbol version definition information at the given offset.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -39,10 +39,7 @@
GElf_Verdaux *
-gelf_getverdaux (data, offset, dst)
- Elf_Data *data;
- int offset;
- GElf_Verdaux *dst;
+gelf_getverdaux (Elf_Data *data, int offset, GElf_Verdaux *dst)
{
GElf_Verdaux *result;
diff --git a/libelf/gelf_getverdef.c b/libelf/gelf_getverdef.c
index 59a32142..651f4fad 100644
--- a/libelf/gelf_getverdef.c
+++ b/libelf/gelf_getverdef.c
@@ -1,5 +1,5 @@
/* Get symbol version definition information at the given offset.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -39,10 +39,7 @@
GElf_Verdef *
-gelf_getverdef (data, offset, dst)
- Elf_Data *data;
- int offset;
- GElf_Verdef *dst;
+gelf_getverdef (Elf_Data *data, int offset, GElf_Verdef *dst)
{
GElf_Verdef *result;
diff --git a/libelf/gelf_getvernaux.c b/libelf/gelf_getvernaux.c
index 8ebf56ab..e47fb0a2 100644
--- a/libelf/gelf_getvernaux.c
+++ b/libelf/gelf_getvernaux.c
@@ -1,5 +1,5 @@
/* Get additional required symbol version information at the given offset.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -39,10 +39,7 @@
GElf_Vernaux *
-gelf_getvernaux (data, offset, dst)
- Elf_Data *data;
- int offset;
- GElf_Vernaux *dst;
+gelf_getvernaux (Elf_Data *data, int offset, GElf_Vernaux *dst)
{
GElf_Vernaux *result;
diff --git a/libelf/gelf_getverneed.c b/libelf/gelf_getverneed.c
index 95fd11fb..c1f5d340 100644
--- a/libelf/gelf_getverneed.c
+++ b/libelf/gelf_getverneed.c
@@ -1,5 +1,5 @@
/* Get required symbol version information at the given offset.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -39,10 +39,7 @@
GElf_Verneed *
-gelf_getverneed (data, offset, dst)
- Elf_Data *data;
- int offset;
- GElf_Verneed *dst;
+gelf_getverneed (Elf_Data *data, int offset, GElf_Verneed *dst)
{
GElf_Verneed *result;
diff --git a/libelf/gelf_getversym.c b/libelf/gelf_getversym.c
index fe8dc62b..68d23c72 100644
--- a/libelf/gelf_getversym.c
+++ b/libelf/gelf_getversym.c
@@ -1,5 +1,5 @@
/* Get symbol version information at the given index.
- Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -39,10 +39,7 @@
GElf_Versym *
-gelf_getversym (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Versym *dst;
+gelf_getversym (Elf_Data *data, int ndx, GElf_Versym *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
diff --git a/libelf/gelf_newehdr.c b/libelf/gelf_newehdr.c
index e9f7a58f..cfa80e1b 100644
--- a/libelf/gelf_newehdr.c
+++ b/libelf/gelf_newehdr.c
@@ -1,5 +1,5 @@
/* Create new ELF header.
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,9 +38,7 @@
unsigned long int
-gelf_newehdr (elf, class)
- Elf *elf;
- int class;
+gelf_newehdr (Elf *elf, int class)
{
return (class == ELFCLASS32
? (unsigned long int) INTUSE(elf32_newehdr) (elf)
diff --git a/libelf/gelf_newphdr.c b/libelf/gelf_newphdr.c
index b6340377..4e95474e 100644
--- a/libelf/gelf_newphdr.c
+++ b/libelf/gelf_newphdr.c
@@ -1,5 +1,5 @@
/* Create new ELF program header.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -38,9 +38,7 @@
unsigned long int
-gelf_newphdr (elf, phnum)
- Elf *elf;
- size_t phnum;
+gelf_newphdr ( Elf *elf, size_t phnum)
{
return (elf->class == ELFCLASS32
? (unsigned long int) INTUSE(elf32_newphdr) (elf, phnum)
diff --git a/libelf/gelf_offscn.c b/libelf/gelf_offscn.c
index 62d12e41..cf206f5b 100644
--- a/libelf/gelf_offscn.c
+++ b/libelf/gelf_offscn.c
@@ -1,5 +1,5 @@
/* Create new ELF header.
- Copyright (C) 2005 Red Hat, Inc.
+ Copyright (C) 2005, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2005.
@@ -38,9 +38,7 @@
Elf_Scn *
-gelf_offscn (elf, offset)
- Elf *elf;
- GElf_Off offset;
+gelf_offscn (Elf *elf, GElf_Off offset)
{
if (elf->class == ELFCLASS32)
{
diff --git a/libelf/gelf_update_auxv.c b/libelf/gelf_update_auxv.c
index dd8f4726..e4e5229c 100644
--- a/libelf/gelf_update_auxv.c
+++ b/libelf/gelf_update_auxv.c
@@ -1,5 +1,5 @@
/* Update information in dynamic table at the given index.
- Copyright (C) 2007 Red Hat, Inc.
+ Copyright (C) 2007, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -37,10 +37,7 @@
int
-gelf_update_auxv (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_auxv_t *src;
+gelf_update_auxv (Elf_Data *data, int ndx, GElf_auxv_t *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
diff --git a/libelf/gelf_update_dyn.c b/libelf/gelf_update_dyn.c
index 2eb526ec..5c515d26 100644
--- a/libelf/gelf_update_dyn.c
+++ b/libelf/gelf_update_dyn.c
@@ -1,5 +1,5 @@
/* Update information in dynamic table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -38,10 +38,7 @@
int
-gelf_update_dyn (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Dyn *src;
+gelf_update_dyn (Elf_Data *data, int ndx, GElf_Dyn *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
diff --git a/libelf/gelf_update_lib.c b/libelf/gelf_update_lib.c
index 1c8c23da..d0f235e8 100644
--- a/libelf/gelf_update_lib.c
+++ b/libelf/gelf_update_lib.c
@@ -1,5 +1,5 @@
/* Update library in table at the given index.
- Copyright (C) 2004, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2004, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -39,10 +39,7 @@
int
-gelf_update_lib (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Lib *src;
+gelf_update_lib (Elf_Data *data, int ndx, GElf_Lib *src)
{
if (data == NULL)
return 0;
diff --git a/libelf/gelf_update_move.c b/libelf/gelf_update_move.c
index ad2ca6ab..4190ee30 100644
--- a/libelf/gelf_update_move.c
+++ b/libelf/gelf_update_move.c
@@ -1,5 +1,5 @@
/* Update move structure at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -39,10 +39,7 @@
int
-gelf_update_move (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Move *src;
+gelf_update_move (Elf_Data *data, int ndx, GElf_Move *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
diff --git a/libelf/gelf_update_sym.c b/libelf/gelf_update_sym.c
index 278129cf..0f478857 100644
--- a/libelf/gelf_update_sym.c
+++ b/libelf/gelf_update_sym.c
@@ -1,5 +1,5 @@
/* Update symbol information in symbol table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -39,10 +39,7 @@
int
-gelf_update_sym (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Sym *src;
+gelf_update_sym (Elf_Data *data, int ndx, GElf_Sym *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
diff --git a/libelf/gelf_update_syminfo.c b/libelf/gelf_update_syminfo.c
index 640a1ed2..6f7f3025 100644
--- a/libelf/gelf_update_syminfo.c
+++ b/libelf/gelf_update_syminfo.c
@@ -1,5 +1,5 @@
/* Update additional symbol information in symbol table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -39,10 +39,7 @@
int
-gelf_update_syminfo (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Syminfo *src;
+gelf_update_syminfo (Elf_Data *data, int ndx, GElf_Syminfo *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
diff --git a/libelf/gelf_update_symshndx.c b/libelf/gelf_update_symshndx.c
index 5e2c7f70..eb80afac 100644
--- a/libelf/gelf_update_symshndx.c
+++ b/libelf/gelf_update_symshndx.c
@@ -1,6 +1,6 @@
/* Update symbol information and section index in symbol table at the
given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -40,12 +40,8 @@
int
-gelf_update_symshndx (symdata, shndxdata, ndx, src, srcshndx)
- Elf_Data *symdata;
- Elf_Data *shndxdata;
- int ndx;
- GElf_Sym *src;
- Elf32_Word srcshndx;
+gelf_update_symshndx (Elf_Data *symdata, Elf_Data *shndxdata, int ndx,
+ GElf_Sym *src, Elf32_Word srcshndx)
{
Elf_Data_Scn *symdata_scn = (Elf_Data_Scn *) symdata;
Elf_Data_Scn *shndxdata_scn = (Elf_Data_Scn *) shndxdata;
diff --git a/libelf/gelf_update_verdaux.c b/libelf/gelf_update_verdaux.c
index b377d40a..f3554fdc 100644
--- a/libelf/gelf_update_verdaux.c
+++ b/libelf/gelf_update_verdaux.c
@@ -1,5 +1,5 @@
/* Update additional symbol version definition information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -39,10 +39,7 @@
int
-gelf_update_verdaux (data, offset, src)
- Elf_Data *data;
- int offset;
- GElf_Verdaux *src;
+gelf_update_verdaux (Elf_Data *data, int offset, GElf_Verdaux *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
diff --git a/libelf/gelf_update_verdef.c b/libelf/gelf_update_verdef.c
index d591a4f1..adb5db14 100644
--- a/libelf/gelf_update_verdef.c
+++ b/libelf/gelf_update_verdef.c
@@ -1,5 +1,5 @@
/* Update symbol version definition information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -39,10 +39,7 @@
int
-gelf_update_verdef (data, offset, src)
- Elf_Data *data;
- int offset;
- GElf_Verdef *src;
+gelf_update_verdef (Elf_Data *data, int offset, GElf_Verdef *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
diff --git a/libelf/gelf_update_vernaux.c b/libelf/gelf_update_vernaux.c
index 1f691b0e..854afabb 100644
--- a/libelf/gelf_update_vernaux.c
+++ b/libelf/gelf_update_vernaux.c
@@ -1,5 +1,5 @@
/* Update additional required symbol version information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -39,10 +39,7 @@
int
-gelf_update_vernaux (data, offset, src)
- Elf_Data *data;
- int offset;
- GElf_Vernaux *src;
+gelf_update_vernaux (Elf_Data *data, int offset, GElf_Vernaux *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
diff --git a/libelf/gelf_update_verneed.c b/libelf/gelf_update_verneed.c
index 713c0171..bf5af5a3 100644
--- a/libelf/gelf_update_verneed.c
+++ b/libelf/gelf_update_verneed.c
@@ -1,5 +1,5 @@
/* Update required symbol version information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 201r Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -39,10 +39,7 @@
int
-gelf_update_verneed (data, offset, src)
- Elf_Data *data;
- int offset;
- GElf_Verneed *src;
+gelf_update_verneed (Elf_Data *data, int offset, GElf_Verneed *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
diff --git a/libelf/gelf_update_versym.c b/libelf/gelf_update_versym.c
index 03a3c5a1..9949dffb 100644
--- a/libelf/gelf_update_versym.c
+++ b/libelf/gelf_update_versym.c
@@ -1,5 +1,5 @@
/* Update symbol version information.
- Copyright (C) 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -39,10 +39,7 @@
int
-gelf_update_versym (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Versym *src;
+gelf_update_versym (Elf_Data *data, int ndx, GElf_Versym *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
diff --git a/libelf/gelf_xlatetof.c b/libelf/gelf_xlatetof.c
index 3366bdcd..e2661805 100644
--- a/libelf/gelf_xlatetof.c
+++ b/libelf/gelf_xlatetof.c
@@ -1,5 +1,5 @@
/* Convert from memory to file representation. Generic ELF version.
- Copyright (C) 2000, 2002 Red Hat, Inc.
+ Copyright (C) 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -38,11 +38,8 @@
Elf_Data *
-gelf_xlatetof (elf, dest, src, encode)
- Elf *elf;
- Elf_Data *dest;
- const Elf_Data * src;
- unsigned int encode;
+gelf_xlatetof (Elf *elf, Elf_Data *dest, const Elf_Data * src,
+ unsigned int encode)
{
if (elf == NULL)
return NULL;
diff --git a/libelf/gelf_xlatetom.c b/libelf/gelf_xlatetom.c
index c3e812f0..8499c711 100644
--- a/libelf/gelf_xlatetom.c
+++ b/libelf/gelf_xlatetom.c
@@ -1,5 +1,5 @@
/* Convert from file to memory representation. Generic ELF version.
- Copyright (C) 2000, 2002 Red Hat, Inc.
+ Copyright (C) 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -38,11 +38,8 @@
Elf_Data *
-gelf_xlatetom (elf, dest, src, encode)
- Elf *elf;
- Elf_Data *dest;
- const Elf_Data * src;
- unsigned int encode;
+gelf_xlatetom (Elf *elf, Elf_Data *dest, const Elf_Data * src,
+ unsigned int encode)
{
if (elf == NULL)
return NULL;
diff --git a/src/ChangeLog b/src/ChangeLog
index 238c4160..49aa3f7e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * strip.c (cleanup_debug): Remove old-style function definitions.
+
2015-09-09 Chih-Hung Hsieh <chh@google.com>
* readelf.c (print_debug_exception_table): Initialize variable before
diff --git a/src/strip.c b/src/strip.c
index 5e69334b..8b08d72d 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -119,7 +119,7 @@ static int debug_fd = -1;
static char *tmp_debug_fname = NULL;
/* Close debug file descriptor, if opened. And remove temporary debug file. */
-static void cleanup_debug ();
+static void cleanup_debug (void);
#define INTERNAL_ERROR(fname) \
do { \
@@ -2208,7 +2208,7 @@ cannot set access and modification date of '%s'"),
}
static void
-cleanup_debug ()
+cleanup_debug (void)
{
if (debug_fd >= 0)
{