added missing test/cfg/posix.c file

This commit is contained in:
Daniel Marjamäki 2015-01-30 07:52:32 +01:00
parent 8d2f271921
commit 355a2d38b3
1 changed files with 19 additions and 0 deletions

19
test/cfg/posix.c Normal file
View File

@ -0,0 +1,19 @@
// Test library configuration for posix.cfg
//
// Usage:
// $ cppcheck --check-library --library=posix --enable=information --error-exitcode=1 --inline-suppr cfg/test/posix.c
// =>
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
//
#include <unistd.h>
void f(char *p) {
isatty (0);
mkdir (p, 0);
getcwd (0, 0);
// cppcheck-suppress nullPointer
readdir (0);
}