summaryrefslogtreecommitdiff
path: root/tests/test-reallocarray.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-reallocarray.c')
-rw-r--r--tests/test-reallocarray.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-reallocarray.c b/tests/test-reallocarray.c
index a6e0cbbfd2..9c4a189efc 100644
--- a/tests/test-reallocarray.c
+++ b/tests/test-reallocarray.c
@@ -31,7 +31,8 @@ main ()
of memory larger than SIZE_MAX bytes. */
for (n = 2; n != 0; n <<= 1)
{
- if (reallocarray (NULL, (size_t) -1 / n + 1, n))
+ void *volatile p = reallocarray (NULL, (size_t) -1 / n + 1, n);
+ if (p)
return 1;
/* Ensure that errno is correctly set. */