]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdw: Add const declaration to getlocations_addr locs.
authorChih-Hung Hsieh <chh@google.com>
Fri, 4 Sep 2015 19:04:11 +0000 (12:04 -0700)
committerMark Wielaard <mjw@redhat.com>
Mon, 7 Sep 2015 20:56:07 +0000 (22:56 +0200)
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>
libdw/ChangeLog
libdw/dwarf_getlocation.c

index 63910ba75fde34c6daa27e859ef3eb0344e39b3c..96f8d90135c1f255aa9bc9b25726f723731f6176 100644 (file)
@@ -1,3 +1,10 @@
+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
index f1dda683d036e8cfd1371f9413422d005483d994..0a0e04b4c142422526d4a3158c5f8612b75baa0b 100644 (file)
@@ -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;