posix.cfg: Removed duplicate utime() function introduced by 841a27c19d. Added more test cases for uninitvar for utime() and utimes().

This commit is contained in:
Martin Ettl 2015-03-08 21:38:43 +01:00
parent 3d9c2b4d97
commit 0839ce5a96
2 changed files with 15 additions and 11 deletions

View File

@ -1,16 +1,5 @@
<?xml version="1.0"?>
<def format="1">
<function name="utime">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<function name="usleep">
<noreturn>false</noreturn>
<arg nr="1">
@ -243,6 +232,9 @@
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- int utimes(const char *filename, const struct timeval times[2]); -->
@ -252,6 +244,9 @@
<not-uninit/>
<not-null/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<!-- DIR *opendir(const char *name); -->

View File

@ -152,8 +152,17 @@ void uninitvar(int fd) {
// cppcheck-suppress unreadVariable
char *buffer = ecvt(d, 11, &decimal, &sign);
gcvt(3.141, 2, NULL);
char *filename;
struct utimbuf *times;
// cppcheck-suppress uninitvar
utime(filename, times);
struct timeval times1[2];
// cppcheck-suppress uninitvar
utime(filename, times1);
}
void uninitvar_types(void) {
// cppcheck-suppress unassignedVariable
blkcnt_t b;