posix.cfg: Improved support for functions from <unistd.h>.
This commit is contained in:
parent
f5ef01ad93
commit
84e831c21c
|
@ -10,6 +10,7 @@
|
|||
<function name="_exit">
|
||||
<noreturn>true</noreturn>
|
||||
</function>
|
||||
<!-- int closedir(DIR *dir); -->
|
||||
<function name="closedir">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
@ -85,6 +86,7 @@
|
|||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- char *getcwd(char *buf, size_t size); -->
|
||||
<function name="getcwd">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="2">
|
||||
|
@ -92,6 +94,7 @@
|
|||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int mkdir(const char *pathname, mode_t mode); -->
|
||||
<function name="mkdir">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
@ -103,6 +106,7 @@
|
|||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int rmdir(const char *pathname); -->
|
||||
<function name="rmdir">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
@ -111,6 +115,7 @@
|
|||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int chdir(const char *path); -->
|
||||
<function name="chdir">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
@ -119,6 +124,7 @@
|
|||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int link(const char *oldpath, const char *newpath); -->
|
||||
<function name="link">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
@ -131,6 +137,16 @@
|
|||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int unlink(const char *pathname); -->
|
||||
<function name="unlink">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
<not-null/>
|
||||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int rename(const char *oldpath, const char *newpath); -->
|
||||
<function name="rename">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
@ -139,6 +155,65 @@
|
|||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int stat(const char *file_name, struct stat *buf); -->
|
||||
<function name="stat">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
<not-null/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-null/>
|
||||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int chmod(const char *path, mode_t mode); -->
|
||||
<function name="chmod">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
<not-null/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int chown(const char *path, uid_t owner, gid_t group); -->
|
||||
<function name="chown">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
<not-null/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="3">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- int utime(const char *filename, struct utimbuf *buf); -->
|
||||
<function name="utime">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
<not-null/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-null/>
|
||||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- DIR *opendir(const char *name); -->
|
||||
<function name="opendir">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
<not-null/>
|
||||
</arg>
|
||||
</function>
|
||||
<function name="isatty">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
@ -171,6 +246,7 @@
|
|||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- struct dirent *readdir(DIR *dir); -->
|
||||
<function name="readdir">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
@ -179,6 +255,7 @@
|
|||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<!-- void rewinddir(DIR *dir); -->
|
||||
<function name="rewinddir">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
|
|
@ -4036,7 +4036,7 @@ private:
|
|||
ASSERT_EQUALS("[test.cpp:3]: (portability) The extra qualification 'Fred::' is unnecessary and is considered an error by many compilers.\n", errout.str());
|
||||
}
|
||||
|
||||
void removeUnnecessaryQualification13() {
|
||||
void removeUnnecessaryQualification13() {
|
||||
const char code[] = "class Fred {\n"
|
||||
"public:\n"
|
||||
" Fred** Fred::Magic();\n"
|
||||
|
|
Loading…
Reference in New Issue