diff options
author | Chih-Hung Hsieh <chh@google.com> | 2015-09-04 12:04:11 -0700 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2015-09-07 22:56:07 +0200 |
commit | f6b93914662566bbbb974cc85ef686a9f6b41a42 (patch) | |
tree | 9c1c490e4797b88795cc14ec419a314be4425870 /libdw | |
parent | aa1c2ca808a267a5a3c372de5461c1f67f9a8869 (diff) | |
download | elfutils-f6b93914662566bbbb974cc85ef686a9f6b41a42.tar.gz |
libdw: Add const declaration to getlocations_addr locs.
And change K&R C function definition to ansi, which prevented GCC from
seeing that callers passed in const arguments.
Signed-off-by: Chih-Hung Hsieh <chh@google.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/ChangeLog | 7 | ||||
-rw-r--r-- | libdw/dwarf_getlocation.c | 15 |
2 files changed, 11 insertions, 11 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 63910ba7..96f8d901 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,4 +1,11 @@ 2015-09-04 Chih-Hung Hsieh <chh@google.com> + Mark Wielaard <mjw@redhat.com> + + * dwarf_getlocation.c (getlocations_addr): Replace K&R function + definition with ansi-C definition and add const qualifier to + locs argument. + +2015-09-04 Chih-Hung Hsieh <chh@google.com> * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function definition with ansi-C definitions. diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c index f1dda683..0a0e04b4 100644 --- a/libdw/dwarf_getlocation.c +++ b/libdw/dwarf_getlocation.c @@ -680,17 +680,10 @@ initial_offset_base (attr, offset, basep) } static ptrdiff_t -getlocations_addr (attr, offset, basep, startp, endp, address, - locs, expr, exprlen) - Dwarf_Attribute *attr; - ptrdiff_t offset; - Dwarf_Addr *basep; - Dwarf_Addr *startp; - Dwarf_Addr *endp; - Dwarf_Addr address; - Elf_Data *locs; - Dwarf_Op **expr; - size_t *exprlen; +getlocations_addr (Dwarf_Attribute *attr, ptrdiff_t offset, + Dwarf_Addr *basep, Dwarf_Addr *startp, Dwarf_Addr *endp, + Dwarf_Addr address, const Elf_Data *locs, Dwarf_Op **expr, + size_t *exprlen) { unsigned char *readp = locs->d_buf + offset; unsigned char *readendp = locs->d_buf + locs->d_size; |