summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/regress_util.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/regress_util.c b/test/regress_util.c
index 1f919fe8..95234180 100644
--- a/test/regress_util.c
+++ b/test/regress_util.c
@@ -1315,7 +1315,16 @@ test_event_calloc(void *arg)
/* mm_calloc() should set errno = ENOMEM and return NULL
* in case of potential overflow. */
errno = 0;
- p = mm_calloc(EV_SIZE_MAX/2, EV_SIZE_MAX/2 + 8);
+#if defined(__clang__)
+#elif defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Walloc-size-larger-than="
+#endif
+ p = mm_calloc(EV_SIZE_MAX, EV_SIZE_MAX);
+#if defined(__clang__)
+#elif defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
tt_assert(p == NULL);
tt_int_op(errno, ==, ENOMEM);