Revert 2e45df3b
. Because there are FP.
This commit is contained in:
parent
27af2bf35d
commit
b8371ebd87
|
@ -1,14 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<def format="1">
|
||||
<!-- wint_t btowc (int c); -->
|
||||
<!-- A function to convert a single byte character to a wide character. -->
|
||||
<function name="btowc">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<leak-ignore/>
|
||||
</function>
|
||||
<function name="usleep">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1">
|
||||
|
|
|
@ -1449,7 +1449,9 @@ bool CheckUninitVar::checkScopeForVariable(const Scope* scope, const Token *tok,
|
|||
uninitdataError(tok, tok->str());
|
||||
else
|
||||
uninitvarError(tok, tok->str());
|
||||
} else
|
||||
}
|
||||
|
||||
else
|
||||
// assume that variable is assigned
|
||||
return true;
|
||||
}
|
||||
|
@ -1664,12 +1666,7 @@ bool CheckUninitVar::isVariableUsage(const Token *vartok, bool pointer, bool all
|
|||
if (!alloc && vartok->previous()->str() == "return")
|
||||
return true;
|
||||
|
||||
// code like: return foo( variable
|
||||
if (vartok->tokAt(-3) && vartok->strAt(-3) == "return"
|
||||
&& vartok->tokAt(-1) && vartok->strAt(-1) == "(")
|
||||
return true;
|
||||
|
||||
// Passing variable to typeof/__alignof__
|
||||
// Passing variable to typeof/__alignof__
|
||||
if (Token::Match(vartok->tokAt(-3), "typeof|__alignof__ ( * %var%"))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ private:
|
|||
TEST_CASE(syntax_error); // Ticket #5073
|
||||
|
||||
// Test that the functions from std.cfg are configured correctly
|
||||
TEST_CASE(stdcfg_btowc);
|
||||
TEST_CASE(stdcfg_clearerr);
|
||||
TEST_CASE(stdcfg_fclose);
|
||||
TEST_CASE(stdcfg_fopen);
|
||||
|
@ -3611,15 +3610,6 @@ private:
|
|||
ASSERT_EQUALS("[test.cpp:6]: (debug) assertion failed '} while ('\n", errout.str());
|
||||
}
|
||||
|
||||
// Test that the btowc function, defined in std.cfg is configured correctly.
|
||||
void stdcfg_btowc() {
|
||||
checkUninitVar2("wchar_t f() { int i; return btowc(i); }");
|
||||
ASSERT_EQUALS("[test.cpp:1]: (error) Uninitialized variable: i\n", errout.str());
|
||||
|
||||
checkUninitVar2("wchar_t f(int i) { return btowc(i); }");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
// Test that the clearerr function, defined in std.cfg is configured correctly.
|
||||
void stdcfg_clearerr() {
|
||||
checkUninitVar("void f() {\n"
|
||||
|
|
Loading…
Reference in New Issue