This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] malloc: quenche last compiler warnings

Looks like __THROW was changed at some point when the __leaf__ attribute
was introduced.  And our version of malloc is out of date wrt. modern
compilers and headers.

See /usr/include/x86_64-linux-gnu/sys/cdefs.h

JIRA: PURE-27597
 tpc/malloc2.13/hooks.h  | 2 +-
 tpc/malloc2.13/malloc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tpc/malloc2.13/hooks.h b/tpc/malloc2.13/hooks.h
index f855b0f1b165..afc8eeb93a8b 100644
--- a/tpc/malloc2.13/hooks.h
+++ b/tpc/malloc2.13/hooks.h
@@ -343,7 +343,7 @@ realloc_check(Void_t* oldmem, size_t bytes, const Void_t *caller)
 static Void_t*
 memalign_check(size_t alignment, size_t bytes, const Void_t *caller)
+  INTERNAL_SIZE_T nb __attribute__((unused));
   Void_t* mem;
   if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL);
diff --git a/tpc/malloc2.13/malloc.c b/tpc/malloc2.13/malloc.c
index 9f2d2df47ea1..d9fecfe3f921 100644
--- a/tpc/malloc2.13/malloc.c
+++ b/tpc/malloc2.13/malloc.c
@@ -1324,7 +1324,7 @@ struct malloc_state;
 #define __malloc_ptr_t void *
-# define __MALLOC_P(args)	args __THROW
+# define __MALLOC_P(args)	args __THROWNL
 /* This macro will be used for functions which might take C++ callback
    functions.  */
 # define __MALLOC_PMT(args)	args

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]