X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-memcmp.c;h=50342cb968c099f5643a850c760962025335d910;hb=ce9012b94357c174a846d129fe9b5d556a0a3bf1;hp=5c2ac29d884d560fe82b6b0bb9bfbf61817f5048;hpb=6731a9abc1604f940a7e12e81084ceb8fddccce2;p=gnulib.git diff --git a/tests/test-memcmp.c b/tests/test-memcmp.c index 5c2ac29d8..50342cb96 100644 --- a/tests/test-memcmp.c +++ b/tests/test-memcmp.c @@ -37,8 +37,10 @@ int main (void) { + void *nil = NULL; /* Use to avoid gcc attribute((nonnull)) warnings. */ + /* Test equal / not equal distinction. */ - ASSERT (memcmp (NULL, NULL, 0) == 0); + ASSERT (memcmp (nil, nil, 0) == 0); ASSERT (memcmp ("foo", "foobar", 2) == 0); ASSERT (memcmp ("foo", "foobar", 3) == 0); ASSERT (memcmp ("foo", "foobar", 4) != 0);