aboutsummaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>2023-07-24 14:15:22 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-07-26 09:45:22 -0300
commit7dfa534ef07cffe9ddb2614e25fbb2e9ae193164 (patch)
tree3e10256355624e8576037270776c3a83cc992c58 /malloc
parentb40f5f84c41bc484d4792531a693d7583cecae0a (diff)
downloadglibc-7dfa534ef07cffe9ddb2614e25fbb2e9ae193164.zip
glibc-7dfa534ef07cffe9ddb2614e25fbb2e9ae193164.tar.gz
glibc-7dfa534ef07cffe9ddb2614e25fbb2e9ae193164.tar.bz2
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>
Diffstat (limited to 'malloc')
-rw-r--r--malloc/set-freeres.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/malloc/set-freeres.c b/malloc/set-freeres.c
index 1aab34b..41ef9c2 100644
--- a/malloc/set-freeres.c
+++ b/malloc/set-freeres.c
@@ -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