summary refs log tree commit diff
path: root/malloc/tst-malloc-tcache-leak.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/tst-malloc-tcache-leak.c')
-rw-r--r--malloc/tst-malloc-tcache-leak.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/malloc/tst-malloc-tcache-leak.c b/malloc/tst-malloc-tcache-leak.c
index f6f6023b5a..2a7a0646c5 100644
--- a/malloc/tst-malloc-tcache-leak.c
+++ b/malloc/tst-malloc-tcache-leak.c
@@ -29,6 +29,7 @@
 #include <malloc.h>
 #include <pthread.h>
 #include <assert.h>
+#include <libc-diag.h>
 
 #include <support/check.h>
 #include <support/support.h>
@@ -72,6 +73,10 @@ do_test (void)
      pthread_t required to run the test.  */
   thread = (pthread_t *) xcalloc (1, sizeof (pthread_t));
 
+  /* The test below covers the deprecated mallinfo function.  */
+  DIAG_PUSH_NEEDS_COMMENT;
+  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
+
   info_before = mallinfo ();
 
   assert (info_before.uordblks != 0);
@@ -104,6 +109,8 @@ do_test (void)
   if (info_after.uordblks > (info_before.uordblks + threads))
     FAIL_EXIT1 ("Memory usage after threads is too high.\n");
 
+  DIAG_POP_NEEDS_COMMENT;
+
   /* Did not detect excessive memory usage.  */
   free (thread);
   exit (0);