Comment.
[gnulib.git] / tests / test-memrchr.c
index 84f6c5b..f829a22 100644 (file)
@@ -41,6 +41,8 @@
 int
 main ()
 {
+  void *nil = NULL; /* Use to avoid gcc attribute((nonnull)) warnings.  */
+
   size_t n = 0x100000;
   char *input = malloc (n);
   ASSERT (input);
@@ -56,7 +58,7 @@ main ()
   ASSERT (MEMRCHR (input, 'a', n) == input + n - 1);
 
   ASSERT (MEMRCHR (input, 'a', 0) == NULL);
-  ASSERT (MEMRCHR (NULL, 'a', 0) == NULL);
+  ASSERT (MEMRCHR (nil, 'a', 0) == NULL);
 
   ASSERT (MEMRCHR (input, 'b', n) == input + n - 2);
   ASSERT (MEMRCHR (input, 'c', n) == input + n - 3);