astyle
This commit is contained in:
parent
c988b14fb5
commit
8a1940e043
|
@ -240,7 +240,9 @@ void CheckBufferOverrun::checkScope(const Token *tok, const char *varname[], con
|
|||
if (!Token::Match(tok2, "%varid% [ %any% ] = 0 ;", tok->tokAt(2)->varId()))
|
||||
{
|
||||
terminateStrncpyError(tok);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -575,7 +575,7 @@ void CheckStl::size()
|
|||
else if ((tok->tokAt(5)->str() == ")" ||
|
||||
tok->tokAt(5)->str() == "&&" ||
|
||||
tok->tokAt(5)->str() == "||" ||
|
||||
tok->tokAt(5)->str() == "!" ) &&
|
||||
tok->tokAt(5)->str() == "!") &&
|
||||
(tok->tokAt(-1)->str() == "(" ||
|
||||
tok->tokAt(-1)->str() == "&&" ||
|
||||
tok->tokAt(-1)->str() == "||" ||
|
||||
|
|
|
@ -1455,8 +1455,8 @@ private:
|
|||
|
||||
void terminateStrncpy1()
|
||||
{
|
||||
check("void foo ( char *bar )\n"
|
||||
"{\n"
|
||||
check("void foo ( char *bar )\n"
|
||||
"{\n"
|
||||
" char baz[100];\n"
|
||||
" strncpy(baz, bar, sizeof(baz));\n"
|
||||
" strncpy(baz, bar, sizeof(baz));\n"
|
||||
|
@ -1473,8 +1473,8 @@ private:
|
|||
|
||||
void terminateStrncpy2()
|
||||
{
|
||||
check("char *foo ( char *bar )\n"
|
||||
"{\n"
|
||||
check("char *foo ( char *bar )\n"
|
||||
"{\n"
|
||||
" char baz[100];\n"
|
||||
" strncpy(baz, bar, sizeof(baz));\n"
|
||||
" bar[99] = 0;\n"
|
||||
|
|
Loading…
Reference in New Issue