mirror of git://sourceware.org/git/glibc.git
malloc: Fix set-freeres.c with gcc 6
Old GCC might trigger the the comparison will always evaluate as ‘true’ warnig for static build: set-freeres.c:87:14: error: the comparison will always evaluate as ‘true’ for the address of ‘__libc_getgrgid_freemem_ptr’ will never be NULL [-Werror=address] if (&__ptr != NULL) \ So add pragma weak for all affected usages. Checked on x86_64 and i686 with gcc 6 and 13. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
b40f5f84c4
commit
7dfa534ef0
|
@ -63,6 +63,52 @@
|
|||
# pragma weak __libpthread_freeres
|
||||
# pragma weak __libc_dlerror_result_free
|
||||
# pragma weak __check_pf_freemem
|
||||
# pragma weak __libc_fgetgrent_freemem_ptr
|
||||
# pragma weak __libc_fgetsgent_freeres_ptr
|
||||
# pragma weak __libc_getnetgrent_freemem_ptr
|
||||
# pragma weak __libc_rcmd_freemem_ptr
|
||||
# pragma weak __libc_rexec_freemem_ptr
|
||||
# pragma weak __libc_mntent_freemem_ptr
|
||||
# pragma weak __libc_fgetpwent_freemem_ptr
|
||||
# pragma weak __libc_getspent_freemem_ptr
|
||||
# pragma weak __libc_resolv_res_hconf_freemem_ptr
|
||||
# pragma weak __libc_fgetspent_freemem_ptr
|
||||
# pragma weak __libc_tzfile_freemem_ptr
|
||||
# pragma weak __libc_getnameinfo_freemem_ptr
|
||||
# pragma weak __libc_getutent_freemem_ptr
|
||||
# pragma weak __libc_getutid_freemem_ptr
|
||||
# pragma weak __libc_getutline_freemem_ptr
|
||||
# pragma weak __libc_reg_printf_freemem_ptr
|
||||
# pragma weak __libc_reg_type_freemem_ptr
|
||||
# pragma weak __libc_getgrgid_freemem_ptr
|
||||
# pragma weak __libc_getgrnam_freemem_ptr
|
||||
# pragma weak __libc_getpwnam_freemem_ptr
|
||||
# pragma weak __libc_getpwuid_freemem_ptr
|
||||
# pragma weak __libc_getspnam_freemem_ptr
|
||||
# pragma weak __libc_getaliasbyname_freemem_ptr
|
||||
# pragma weak __libc_gethostbyaddr_freemem_ptr
|
||||
# pragma weak __libc_gethostbyname_freemem_ptr
|
||||
# pragma weak __libc_gethostbyname2_freemem_ptr
|
||||
# pragma weak __libc_getnetbyaddr_freemem_ptr
|
||||
# pragma weak __libc_getnetbyname_freemem_ptr
|
||||
# pragma weak __libc_getprotobynumber_freemem_ptr
|
||||
# pragma weak __libc_getprotobyname_freemem_ptr
|
||||
# pragma weak __libc_getrpcbyname_freemem_ptr
|
||||
# pragma weak __libc_getrpcbynumber_freemem_ptr
|
||||
# pragma weak __libc_getservbyname_freemem_ptr
|
||||
# pragma weak __libc_getservbyport_freemem_ptr
|
||||
# pragma weak __libc_getgrent_freemem_ptr
|
||||
# pragma weak __libc_getpwent_freemem_ptr
|
||||
# pragma weak __libc_getaliasent_freemem_ptr
|
||||
# pragma weak __libc_gethostent_freemem_ptr
|
||||
# pragma weak __libc_getnetent_freemem_ptr
|
||||
# pragma weak __libc_getprotoent_freemem_ptr
|
||||
# pragma weak __libc_getrpcent_freemem_ptr
|
||||
# pragma weak __libc_getservent_freemem_ptr
|
||||
# pragma weak __libc_efgcvt_freemem_ptr
|
||||
# pragma weak __libc_qefgcvt_freemem_ptr
|
||||
# pragma weak __libc_qefgcvt_freemem_ptr
|
||||
# pragma weak __ttyname_freemem_ptr
|
||||
#endif
|
||||
|
||||
#ifdef SHARED
|
||||
|
|
Loading…
Reference in New Issue