We already require -std=gnu99 and old-style function definitions might
hide some compiler warnings.
Signed-off-by: Mark Wielaard <mjw(a)redhat.com>
---
backends/ChangeLog | 6 +++++
backends/arm_attrs.c | 10 +++-----
backends/linux-core-note.c | 12 +++------
backends/ppc_attrs.c | 10 +++-----
config/ChangeLog | 4 +++
config/eu.am | 2 +-
lib/ChangeLog | 9 +++++++
lib/dynamicsizehash.c | 31 +++++-----------------
lib/md5.c | 32 ++++++-----------------
lib/sha1.c | 23 +++++------------
lib/xmalloc.c | 12 +++------
lib/xstrdup.c | 5 ++--
lib/xstrndup.c | 6 ++---
libasm/ChangeLog | 4 +++
libasm/asm_abort.c | 3 +--
libasm/asm_addsleb128.c | 4 +--
libasm/asm_addstrz.c | 5 +---
libasm/asm_adduleb128.c | 4 +--
libasm/asm_align.c | 8 ++----
libasm/asm_end.c | 6 ++---
libasm/asm_error.c | 6 ++---
libasm/asm_fill.c | 5 +---
libasm/asm_getelf.c | 3 +--
libasm/asm_newabssym.c | 9 ++-----
libasm/asm_newcomsym.c | 7 ++---
libasm/asm_newscn.c | 7 ++---
libasm/asm_newscn_ingrp.c | 8 ++----
libasm/asm_newscngrp.c | 7 ++---
libasm/asm_newsubscn.c | 4 +--
libasm/asm_newsym.c | 8 ++----
libasm/asm_scngrp_newsignature.c | 4 +--
libdw/ChangeLog | 4 +++
libdw/dwarf_abbrevhaschildren.c | 3 +--
libdw/dwarf_addrdie.c | 5 +---
libdw/dwarf_aggregate_size.c | 4 +--
libdw/dwarf_arrayorder.c | 3 +--
libdw/dwarf_attr.c | 5 +---
libdw/dwarf_begin.c | 4 +--
libdw/dwarf_begin_elf.c | 5 +---
libdw/dwarf_bitoffset.c | 3 +--
libdw/dwarf_bitsize.c | 3 +--
libdw/dwarf_bytesize.c | 3 +--
libdw/dwarf_cfi_addrframe.c | 5 +---
libdw/dwarf_cfi_end.c | 3 +--
libdw/dwarf_child.c | 4 +--
libdw/dwarf_cu_die.c | 14 +++-------
libdw/dwarf_cu_getdwarf.c | 3 +--
libdw/dwarf_cuoffset.c | 3 +--
libdw/dwarf_diecu.c | 7 ++---
libdw/dwarf_diename.c | 3 +--
libdw/dwarf_dieoffset.c | 3 +--
libdw/dwarf_end.c | 3 +--
libdw/dwarf_entry_breakpoints.c | 4 +--
libdw/dwarf_entrypc.c | 4 +--
libdw/dwarf_error.c | 6 ++---
libdw/dwarf_formaddr.c | 4 +--
libdw/dwarf_formblock.c | 4 +--
libdw/dwarf_formflag.c | 4 +--
libdw/dwarf_formref.c | 8 ++----
libdw/dwarf_formref_die.c | 4 +--
libdw/dwarf_formsdata.c | 4 +--
libdw/dwarf_formstring.c | 3 +--
libdw/dwarf_formudata.c | 4 +--
libdw/dwarf_frame_cfa.c | 5 +---
libdw/dwarf_frame_info.c | 7 ++---
libdw/dwarf_frame_register.c | 8 ++----
libdw/dwarf_getabbrev.c | 13 +++-------
libdw/dwarf_getabbrevattr.c | 8 ++----
libdw/dwarf_getabbrevcode.c | 3 +--
libdw/dwarf_getabbrevtag.c | 3 +--
libdw/dwarf_getarange_addr.c | 4 +--
libdw/dwarf_getaranges.c | 5 +---
libdw/dwarf_getattrcnt.c | 4 +--
libdw/dwarf_getcfi.c | 3 +--
libdw/dwarf_getcfi_elf.c | 3 +--
libdw/dwarf_getelf.c | 3 +--
libdw/dwarf_getlocation.c | 40 ++++++++---------------------
libdw/dwarf_getlocation_attr.c | 5 +---
libdw/dwarf_getlocation_die.c | 6 ++---
libdw/dwarf_getlocation_implicit_pointer.c | 6 ++---
libdw/dwarf_getmacros.c | 7 ++---
libdw/dwarf_getpubnames.c | 8 +++---
libdw/dwarf_getsrcdirs.c | 5 +---
libdw/dwarf_getstring.c | 5 +---
libdw/dwarf_hasattr.c | 4 +--
libdw/dwarf_haschildren.c | 3 +--
libdw/dwarf_hasform.c | 4 +--
libdw/dwarf_highpc.c | 4 +--
libdw/dwarf_lowpc.c | 4 +--
libdw/dwarf_nextcu.c | 29 ++++++---------------
libdw/dwarf_offdie.c | 10 ++------
libdw/dwarf_peel_type.c | 4 +--
libdw/dwarf_siblingof.c | 4 +--
libdw/dwarf_srclang.c | 3 +--
libdw/dwarf_tag.c | 3 +--
libdw/dwarf_whatattr.c | 3 +--
libdw/dwarf_whatform.c | 3 +--
libdw/libdw_visit_scopes.c | 20 ++++++++-------
libdwfl/ChangeLog | 10 ++++++++
libdwfl/core-file.c | 4 +--
libdwfl/dwfl_error.c | 3 +--
libdwfl/dwfl_module_dwarf_cfi.c | 4 +--
libdwfl/dwfl_module_eh_cfi.c | 4 +--
libdwfl/dwfl_module_register_names.c | 11 ++++----
libdwfl/dwfl_module_return_value_location.c | 6 ++---
libdwfl/dwfl_version.c | 3 +--
libebl/ChangeLog | 4 +++
libebl/ebl_check_special_section.c | 7 ++---
libebl/ebl_check_special_symbol.c | 8 ++----
libebl/ebl_syscall_abi.c | 7 +----
libebl/eblabicfi.c | 4 +--
libebl/eblauxvinfo.c | 7 ++---
libebl/eblbackendname.c | 3 +--
libebl/eblbsspltp.c | 3 +--
libebl/eblcheckobjattr.c | 10 +++-----
libebl/eblcopyrelocp.c | 4 +--
libebl/eblcorenote.c | 14 +++-------
libebl/eblcorenotetypename.c | 6 +----
libebl/ebldebugscnp.c | 4 +--
libebl/ebldynamictagcheck.c | 4 +--
libebl/ebldynamictagname.c | 6 +----
libebl/eblelfclass.c | 3 +--
libebl/eblelfdata.c | 3 +--
libebl/eblelfmachine.c | 3 +--
libebl/eblgotpcreloccheck.c | 4 +--
libebl/eblmachineflagcheck.c | 4 +--
libebl/eblmachineflagname.c | 6 +----
libebl/eblmachinesectionflagcheck.c | 4 +--
libebl/eblnonerelocp.c | 4 +--
libebl/eblobjecttypename.c | 6 +----
libebl/eblobjnote.c | 8 ++----
libebl/eblobjnotetypename.c | 8 ++----
libebl/eblopenbackend.c | 8 ++----
libebl/eblosabiname.c | 6 +----
libebl/eblreginfo.c | 12 +++------
libebl/eblrelativerelocp.c | 4 +--
libebl/eblrelocsimpletype.c | 4 +--
libebl/eblreloctypecheck.c | 4 +--
libebl/eblreloctypename.c | 6 +----
libebl/eblrelocvaliduse.c | 4 +--
libebl/eblretval.c | 6 ++---
libebl/eblsectionname.c | 10 ++------
libebl/eblsectiontypename.c | 6 +----
libebl/eblsegmenttypename.c | 6 +----
libebl/eblshflagscombine.c | 5 +---
libebl/eblsymbolbindingname.c | 6 +----
libebl/eblsymboltypename.c | 6 +----
libebl/eblsysvhashentrysize.c | 3 +--
libelf/ChangeLog | 4 +++
libelf/elf32_checksum.c | 5 ++--
libelf/elf32_fsize.c | 7 ++---
libelf/elf32_getehdr.c | 12 +++------
libelf/elf32_getphdr.c | 8 +++---
libelf/elf32_getshdr.c | 11 +++-----
libelf/elf32_newehdr.c | 5 ++--
libelf/elf32_newphdr.c | 6 ++---
libelf/elf32_offscn.c | 6 ++---
libelf/elf32_xlatetof.c | 8 +++---
libelf/elf32_xlatetom.c | 8 +++---
libelf/elf_begin.c | 10 +++-----
libelf/elf_cntl.c | 6 ++---
libelf/elf_end.c | 5 ++--
libelf/elf_error.c | 8 +++---
libelf/elf_fill.c | 5 ++--
libelf/elf_flagdata.c | 7 ++---
libelf/elf_flagehdr.c | 7 ++---
libelf/elf_flagelf.c | 7 ++---
libelf/elf_flagphdr.c | 7 ++---
libelf/elf_flagscn.c | 7 ++---
libelf/elf_flagshdr.c | 7 ++---
libelf/elf_getarhdr.c | 5 ++--
libelf/elf_getaroff.c | 5 ++--
libelf/elf_getarsym.c | 4 +--
libelf/elf_getbase.c | 5 ++--
libelf/elf_getdata.c | 8 ++----
libelf/elf_getdata_rawchunk.c | 8 ++----
libelf/elf_getident.c | 6 ++---
libelf/elf_getphdrnum.c | 14 +++-------
libelf/elf_getscn.c | 6 ++---
libelf/elf_getshdrnum.c | 10 +++-----
libelf/elf_getshdrstrndx.c | 6 ++---
libelf/elf_gnu_hash.c | 5 ++--
libelf/elf_hash.c | 5 ++--
libelf/elf_kind.c | 5 ++--
libelf/elf_memory.c | 6 ++---
libelf/elf_ndxscn.c | 5 ++--
libelf/elf_newscn.c | 5 ++--
libelf/elf_next.c | 5 ++--
libelf/elf_nextscn.c | 6 ++---
libelf/elf_rand.c | 6 ++---
libelf/elf_rawdata.c | 6 ++---
libelf/elf_rawfile.c | 6 ++---
libelf/elf_readall.c | 5 ++--
libelf/elf_strptr.c | 5 +---
libelf/elf_update.c | 4 +--
libelf/elf_version.c | 5 ++--
libelf/gelf_checksum.c | 5 ++--
libelf/gelf_fsize.c | 8 ++----
libelf/gelf_getauxv.c | 7 ++---
libelf/gelf_getclass.c | 5 ++--
libelf/gelf_getdyn.c | 7 ++---
libelf/gelf_getehdr.c | 10 +++-----
libelf/gelf_getlib.c | 7 ++---
libelf/gelf_getmove.c | 7 ++---
libelf/gelf_getnote.c | 10 +++-----
libelf/gelf_getphdr.c | 7 ++---
libelf/gelf_getrel.c | 7 ++---
libelf/gelf_getrela.c | 7 ++---
libelf/gelf_getshdr.c | 6 ++---
libelf/gelf_getsym.c | 7 ++---
libelf/gelf_getsyminfo.c | 7 ++---
libelf/gelf_getsymshndx.c | 10 +++-----
libelf/gelf_getverdaux.c | 7 ++---
libelf/gelf_getverdef.c | 7 ++---
libelf/gelf_getvernaux.c | 7 ++---
libelf/gelf_getverneed.c | 7 ++---
libelf/gelf_getversym.c | 7 ++---
libelf/gelf_newehdr.c | 6 ++---
libelf/gelf_newphdr.c | 6 ++---
libelf/gelf_offscn.c | 6 ++---
libelf/gelf_update_auxv.c | 7 ++---
libelf/gelf_update_dyn.c | 7 ++---
libelf/gelf_update_lib.c | 7 ++---
libelf/gelf_update_move.c | 7 ++---
libelf/gelf_update_sym.c | 7 ++---
libelf/gelf_update_syminfo.c | 7 ++---
libelf/gelf_update_symshndx.c | 10 +++-----
libelf/gelf_update_verdaux.c | 7 ++---
libelf/gelf_update_verdef.c | 7 ++---
libelf/gelf_update_vernaux.c | 7 ++---
libelf/gelf_update_verneed.c | 7 ++---
libelf/gelf_update_versym.c | 7 ++---
libelf/gelf_xlatetof.c | 9 +++----
libelf/gelf_xlatetom.c | 9 +++----
src/ChangeLog | 4 +++
src/strip.c | 2 +-
236 files changed, 480 insertions(+), 1050 deletions(-)
diff --git a/backends/ChangeLog b/backends/ChangeLog
index 2059d86..0434e20 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-22 Chih-Hung Hsieh <chh(a)google.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(a)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 c858715..6842b77 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 db82e85..ff2b226 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 ebeafe5..612c576 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 31eeca7..e24263c 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw(a)redhat.com>
+
+ * eu.am (AM_CFLAGS): Add -Wold-style-definition.
+
2015-08-04 Mark Wielaard <mjw(a)redhat.com>
* 10-default-yama-scope.conf: New file.
diff --git a/config/eu.am b/config/eu.am
index 70d32de..7d0c10d 100644
--- a/config/eu.am
+++ b/config/eu.am
@@ -38,7 +38,7 @@ STACK_USAGE_WARNING=-Wstack-usage=262144
else
STACK_USAGE_WARNING=
endif
-AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 -Wold-style-definition \
$(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 d04bf17..d1bdc7b 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,12 @@
+2015-09-22 Mark Wielaard <mjw(a)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(a)redhat.com>
* eu-config.h (ALLOW_UNALIGNED): Define when ! CHECK_UNDEFINED.
diff --git a/lib/dynamicsizehash.c b/lib/dynamicsizehash.c
index 1fdff1b..f9406eb 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 1c27549..40f3044 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(a)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 0e84562..6a9b61f 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(a)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 27ccab9..0cde384 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 d9d6010..aa10352 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 52304e6..92b79c1 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 91338d0..0eb84c6 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw(a)redhat.com>
+
+ * asm_*.c: Remove old-style function definitions.
+
2015-09-04 Chih-Hung Hsieh <chh(a)google.com>
* asm_addint8.c (FCT): Replace K&R function definition
diff --git a/libasm/asm_abort.c b/libasm/asm_abort.c
index ef55ee9..12743dc 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 3692789..dc62c95 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 87663f3..26e06bb 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 a3a8573..96438cc 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 2025b02..b7708f5 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 f4145a7..d629fcd 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 300a798..5443049 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 6b92bc3..62d9d73 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 edeff13..2a5c37b 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 4e59901..c5b7bea 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 7a578e0..ee5c140 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 ece7f5c..e236769 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 6ef7cb9..fd45be6 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 2808e69..c5968c1 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 a83607a..906240a 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 deca08a..7f52291 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 d87f4a4..2fbb334 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 2e27ff9..cb5ec9c 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw(a)redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-09-15 Mark Wielaard <mjw(a)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 4a83e31..0f17c7e 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 94eb148..3a08ab7 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 0247847..aaeb7ed 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 759fa4d..da64f99 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 f247c1a..db8acfe 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 9f3050f..d04e5b9 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 6d38946..63532fd 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 1648ecd..c1a3a34 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 ea9946b..0ed9b71 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 6499a0a..116cd32 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 1c0da03..4424027 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 6eb2ade..d68e2db 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 58a438b..cc95fb3 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 48f4176..194da58 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 f8a2e9b..562460f 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 3ceffdb..ba37648 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 bd9a37a..5281c35 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 050d8f1..96450c1 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 965b2c8..8028f6d 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 922dc8f..32b551d 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 ffd5169..abfee73 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 8eb39db..0ef3b0e 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 fe38999..c431bd3 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 9d4a388..ddc4838 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 3d56f22..13f9e72 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 bdc2267..b48ede4 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 2592437..c5fb19b 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 8b92e22..7e2b11a 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 2380bf4..e7deaee 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 02b56d4..83abd53 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 a01ff31..e41981a 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 a9ae7e7..07f998c 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 7da46fb..9ba560f 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 10d2fe4..37e8e91 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 0efde45..ef51b84 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 574467c..3b4da99 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 0df9064..8691708 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 36a5262..52aaa3f 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 fc143de..d383e22 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 6c6169e..4252746 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 72be766..2bfb4ac 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 a49a9f0..9aed403 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 3e611f8..315cc02 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 ecd1859..2d6268e 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 0a0e04b..a4a2761 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 3229baf..8b6a4af 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 fa03aac..b4908d2 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 f1c16be..9505382 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 a326e58..eb50508 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 41b2407..462b6ff 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 47283ec..8160ed3 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 672bb27..5620cb0 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 812c09b..2bb8dc8 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 d0ce51e..03a8173 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 a95ca9e..a0c3229 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 8bf93f0..2070254 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 4677aed..b3be2b0 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 875d869..fa9b0af 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 b5dd405..15f55c2 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 7b29d35..5dca8f8 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 0dafc17..df39c1c 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 6cc06ff..f10e764 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 0b1a4b0..331eaa0 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 8fe5535..d664b02 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 1d0d14b..dee29a9 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 d0b5134..c882e4a 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 0ab386f..f34087c 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,13 @@
+2015-09-22 Mark Wielaard <mjw(a)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(a)google.com>
Mark Wielaard <mjw(a)redhat.com>
diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c
index bbe0899..ea0725b 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 56ec2b0..7bcf61c 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 5182d6a..1dac26d 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 da10d9f..dbe43b0 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 2da4b53..18fed37 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 ad83cbf..29da61f 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 9673a53..d1c5d91 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 aab0857..4ea6d49 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw(a)redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-09-09 Chih-Hung Hsieh <chh(a)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 aabe44e..903b69d 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 8e702ba..bdcb026 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 de73703..a25369d 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 20a29ea..6b0e18e 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 5c310b2..ce1141b 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 92e576e..a2b2df6 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 95a5d8a..24c4a08 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 b0481d2..b590a03 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 702f8c7..0458c4f 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 2a79278..783f981 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 b6db6cd..826f9a1 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 01a5675..2964fdb 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 17acee0..c2311cc 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 6b09ee6..3aaccd0 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 62d1283..2ffef30 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 b09dbb5..072924b 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 cd961e7..c2c8627 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 55625de..7c9c079 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 d6d7931..e98b600 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 e392f5a..6079a61 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 671eb8c..a73b230 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 07c6b0e..e51a3b0 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 1a2c8e8..b0fd372 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 b9bf1c0..fa1eb93 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 8a70e61..8e2e329 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 02b24d3..b301400 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 3ea6f56..b60f2af 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 f213b4a..acc4849 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 297caec..51f5dce 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 085fc93..9bd2928 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 e322ace..80e67ef 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 fb39101..e53ec0c 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 62c4ae7..f0bed34 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 056a549..7c03982 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 81c7add..21c537f 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 3a30cd6..5dc1ec6 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 3cad66e..14eda76 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 87625f8..4deaaaa 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 fd5bfda..9797425 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 4e653d2..09fa874 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 f966646..2049431 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 bb56e5b..f7b1dda 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw(a)redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-06-18 Mark Wielaard <mjw(a)redhat.com>
* elf32_updatefile.c (updatefile): Always free shdr_data and scns
diff --git a/libelf/elf32_checksum.c b/libelf/elf32_checksum.c
index 4c59856..f9dfccb 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(a)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 d7496fa..fddae91 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(a)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 ee0a2e0..2b9ad1f 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(a)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 38e489d..99b4ac0 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(a)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 ee1aed8..a5fdb54 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(a)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 4b547bc..775d115 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(a)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 f89153b..4aa7213 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(a)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 a1ff6d4..9e757c8 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(a)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 27a973e..ac4eaf4 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(a)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 368df07..13cd485 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(a)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 f002ebf..213b5c0 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 a3c5805..ab13ffb 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(a)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 d4ae051..7ea876c 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(a)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 aa7f917..d6e5183 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(a)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 174ab45..6ebdf63 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(a)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 ace8cc5..cd2b123 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(a)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 d3a320b..a98276d 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(a)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 b34bd4f..bd90a21 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(a)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 2a589cc..0682d1f 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(a)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 3ff826c..2164a8c 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(a)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 8d797af..febf4ab 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(a)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 f8b36b8..509f1da 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(a)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 62da34d..5b59203 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(a)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 8324244..1ab94ca 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 ff0feb4..8ec5f87 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(a)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 770e035..9a567e5 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 5cc11e7..51b3e3e 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 10beeaf..5abf8c9 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(a)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 f2fad87..fe70345 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 7c6b7de..9f7213b 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(a)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 73a3300..4875c19 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(a)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 6f8d66e..aead2fe 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(a)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 4c21857..5a1b852 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(a)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 306ebc2..345697e 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(a)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 d8ab2fd..0fb3f0c 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(a)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 08f85a1..a47f1d2 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(a)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 bd4bfbf..488c4e5 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(a)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 6e0029e..d15a642 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(a)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 1f5c03c..6edafd2 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(a)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 0d2bd66..62cb891 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(a)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 cef4e44..f1850e7 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(a)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 9672652..db28f5d 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(a)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 dd71b88..b3837f4 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(a)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 0101618..52a0b4e 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(a)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 e73bf36..c5138dc 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 9eb007b..00f7a01 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 dcb6758..7c336ff 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(a)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 4906782..831c54c 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(a)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 a9d2288..a124fa8 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(a)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 a2f04e7..1591be2 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 53759dc..7d0924b 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(a)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 c366fd5..a0090e1 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(a)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 ea83fc0..cace0ef 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(a)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 880817e..a8ac478 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(a)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 b81d61f..18efedc 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(a)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 7dc8215..c75edda 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 1a6ee62..c719e4b 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(a)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 1f786ff..309e3d3 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(a)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 cead7ee..d695f65 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(a)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 4a48cb6..3858c8e 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(a)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 a141c2d..01534d2 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(a)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 8d7da7f..8360ed3 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(a)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 c19e876..17c90fc 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(a)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 d125d9e..739a765 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(a)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 59a3214..651f4fa 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(a)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 8ebf56a..e47fb0a 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(a)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 95fd11f..c1f5d34 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(a)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 fe8dc62..68d23c7 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(a)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 e9f7a58..cfa80e1 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(a)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 b634037..4e95474 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(a)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 62d12e4..cf206f5 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(a)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 dd8f472..e4e5229 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 2eb526e..5c515d2 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(a)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 1c8c23d..d0f235e 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(a)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 ad2ca6a..4190ee3 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(a)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 278129c..0f47885 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(a)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 640a1ed..6f7f302 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(a)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 5e2c7f7..eb80afa 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(a)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 b377d40..f3554fd 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(a)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 d591a4f..adb5db1 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(a)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 1f691b0..854afab 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(a)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 713c017..bf5af5a 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(a)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 03a3c5a..9949dff 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(a)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 3366bdc..e266180 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(a)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 c3e812f..8499c71 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(a)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 238c416..49aa3f7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-22 Mark Wielaard <mjw(a)redhat.com>
+
+ * strip.c (cleanup_debug): Remove old-style function definitions.
+
2015-09-09 Chih-Hung Hsieh <chh(a)google.com>
* readelf.c (print_debug_exception_table): Initialize variable before
diff --git a/src/strip.c b/src/strip.c
index 5e69334..a26ba93 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -2208,7 +2208,7 @@ cannot set access and modification date of '%s'"),
}
static void
-cleanup_debug ()
+cleanup_debug (void)
{
if (debug_fd >= 0)
{
--
1.8.3.1