diff options
Diffstat (limited to 'posix/tst-dir.c')
-rw-r--r-- | posix/tst-dir.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/posix/tst-dir.c b/posix/tst-dir.c index 8897f8e06d..d0e487824a 100644 --- a/posix/tst-dir.c +++ b/posix/tst-dir.c @@ -319,6 +319,10 @@ main (int argc, char *argv[]) exit (1); } + /* The test below covers the deprecated readdir64_r function. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations"); + /* Try to find the new directory. */ rewinddir (dir1); while (readdir64_r (dir1, &direntbuf.d, &d) == 0 && d != NULL) @@ -351,6 +355,8 @@ main (int argc, char *argv[]) } } + DIAG_POP_NEEDS_COMMENT; + if (d == NULL) { printf ("haven't found new directory \"%s\"\n", buf); @@ -439,6 +445,10 @@ main (int argc, char *argv[]) result = 1; } + /* The test below covers the deprecated readdir64_r function. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations"); + /* We now should have a directory and a file in the new directory. */ rewinddir (dir2); while (readdir64_r (dir2, &direntbuf.d, &d) == 0 && d != NULL) @@ -492,6 +502,8 @@ main (int argc, char *argv[]) } } + DIAG_POP_NEEDS_COMMENT; + if (stat64 ("does-not-exist", &st1) >= 0) { puts ("stat for unexisting file did not fail"); |