[rtems commit] malloctest/init.c: Disable check maximum size warning to allow error test case

Joel Sherrill joel at rtems.org
Thu Jun 22 14:04:33 UTC 2017


Module:    rtems
Branch:    master
Commit:    d93181a0597f75b57f9735cbf67d72063f13fd89
Changeset: http://git.rtems.org/rtems/commit/?id=d93181a0597f75b57f9735cbf67d72063f13fd89

Author:    Joel Sherrill <joel at rtems.org>
Date:      Mon Jun 12 11:49:51 2017 -0500

malloctest/init.c: Disable check maximum size warning to allow error test case

---

 testsuites/libtests/malloctest/init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c
index fb22e4d..6be6c1c 100644
--- a/testsuites/libtests/malloctest/init.c
+++ b/testsuites/libtests/malloctest/init.c
@@ -1260,7 +1260,10 @@ rtems_task Init(
   /*
    * Verify case where block is too large to calloc.
    */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Walloc-size-larger-than=N"
   p1 = calloc( 1, SIZE_MAX );
+#pragma GCC diagnostic pop
   if (p1) {
     printf("ERROR on attempt to calloc SIZE_MAX block expected failure.");
     free( p1 );




More information about the vc mailing list