projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix test-file-has-acl on FreeBSD.
[gnulib.git]
/
tests
/
test-memchr.c
diff --git
a/tests/test-memchr.c
b/tests/test-memchr.c
index
d108f1a
..
ebf3cfc
100644
(file)
--- a/
tests/test-memchr.c
+++ b/
tests/test-memchr.c
@@
-41,6
+41,8
@@
int
main ()
{
int
main ()
{
+ void *nil = NULL; /* Use to avoid gcc attribute((nonnull)) warnings. */
+
size_t n = 0x100000;
char *input = malloc (n);
ASSERT (input);
size_t n = 0x100000;
char *input = malloc (n);
ASSERT (input);
@@
-56,7
+58,7
@@
main ()
ASSERT (MEMCHR (input, 'a', n) == input);
ASSERT (MEMCHR (input, 'a', 0) == NULL);
ASSERT (MEMCHR (input, 'a', n) == input);
ASSERT (MEMCHR (input, 'a', 0) == NULL);
- ASSERT (MEMCHR (
NULL
, 'a', 0) == NULL);
+ ASSERT (MEMCHR (
nil
, 'a', 0) == NULL);
ASSERT (MEMCHR (input, 'b', n) == input + 1);
ASSERT (MEMCHR (input, 'c', n) == input + 2);
ASSERT (MEMCHR (input, 'b', n) == input + 1);
ASSERT (MEMCHR (input, 'c', n) == input + 2);