diff options
| author | Mark Wielaard <[email protected]> | 2018-11-16 09:27:00 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2018-11-16 09:27:00 +0100 |
| commit | a01938d584b91e747167bb4b3f30ec300c4d6e43 (patch) | |
| tree | 2853386782ba20024c6d74ae34f80f5e51e465f1 /libelf | |
| parent | c338a0541663af13ede85732a472068ec74d9993 (diff) | |
libelf: Mark both fsize and msize with const attribute.
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 <[email protected]>
Diffstat (limited to 'libelf')
| -rw-r--r-- | libelf/ChangeLog | 5 | ||||
| -rw-r--r-- | libelf/libelfP.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 93820d19..68c4fbdd 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,8 @@ +2018-11-16 Mark Wielaard <[email protected]> + + * libebl.h (__elf32_msize): Mark with const attribute. + (__elf64_msize): Likewise. + 2018-11-13 Mark Wielaard <[email protected]> * elf_getdata.c (__libelf_set_rawdata_wrlock): Explicitly set the diff --git a/libelf/libelfP.h b/libelf/libelfP.h index fa6d55d8..9f3e8e9d 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -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. */ |
