posix.cfg: Added support for blkcnt_t datatype.

This commit is contained in:
Martin Ettl 2015-01-23 17:29:18 +01:00
parent ee046af20c
commit ac551807b6
2 changed files with 11 additions and 0 deletions

View File

@ -446,4 +446,5 @@
<podtype name="pid_t" sign="s"/>
<podtype name="uid_t" sign="u"/>
<podtype name="gid_t" sign="u"/>
<podtype name="blkcnt_t" sign="u"/>
</def>

View File

@ -94,6 +94,7 @@ private:
TEST_CASE(stdcfg_tmpnam);
TEST_CASE(uninitvar_posix_write);
TEST_CASE(uninitvar_posix_types);
// dead pointer
TEST_CASE(deadPointer);
@ -4215,6 +4216,15 @@ private:
"}");
ASSERT_EQUALS("", errout.str());
}
void uninitvar_posix_types() {
checkUninitVarB("blkcnt_t* f() {blkcnt_t *b; return b;}");
ASSERT_EQUALS("[test.cpp:1]: (error) Uninitialized variable: b\n", errout.str());
checkUninitVarB("blkcnt_t f() {blkcnt_t b; return b;}");
ASSERT_EQUALS("[test.cpp:1]: (error) Uninitialized variable: b\n", errout.str());
;
}
};
REGISTER_TEST(TestUninitVar)