]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libelf: Mark both fsize and msize with const attribute.
authorMark Wielaard <mark@klomp.org>
Fri, 16 Nov 2018 08:27:00 +0000 (09:27 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 16 Nov 2018 08:27:00 +0000 (09:27 +0100)
GCC9 -Wmissing-attributes pointed out that although we alias the fsize
and msize functions only fsize was marked as const. Fix by also marking
the msize definition as const.

https://sourceware.org/bugzilla/show_bug.cgi?id=23884

Signed-off-by: Mark Wielaard <mark@klomp.org>
libelf/ChangeLog
libelf/libelfP.h

index 93820d19f721aab365b5f3f242a4fc9a1db0f435..68c4fbdde491bcf1fb3c6904684c62f6a99ae321 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-16  Mark Wielaard  <mark@klomp.org>
+
+       * libebl.h (__elf32_msize): Mark with const attribute.
+       (__elf64_msize): Likewise.
+
 2018-11-13  Mark Wielaard  <mark@klomp.org>
 
        * elf_getdata.c (__libelf_set_rawdata_wrlock): Explicitly set the
index fa6d55d8a7045a8616cef1624a979d66c1df5d50..9f3e8e9df893d38cf31103cfa97635870250768d 100644 (file)
@@ -461,9 +461,9 @@ extern Elf_Type __libelf_data_type (Elf *elf, int sh_type, GElf_Xword align)
    These functions cannot be marked internal since they are aliases
    of the export elfXX_fsize functions.*/
 extern size_t __elf32_msize (Elf_Type __type, size_t __count,
-                            unsigned int __version);
+                            unsigned int __version) __const_attribute__;
 extern size_t __elf64_msize (Elf_Type __type, size_t __count,
-                            unsigned int __version);
+                            unsigned int __version) __const_attribute__;
 
 
 /* Create Elf descriptor from memory image.  */