astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2014-07-06 17:50:21 +02:00
parent 0ddd7752b5
commit 3169a2d215
2 changed files with 10 additions and 10 deletions

View File

@ -1274,7 +1274,7 @@ void CheckBufferOverrun::checkStructVariable()
ArrayInfo temp = arrayInfo; ArrayInfo temp = arrayInfo;
temp.declarationId(0); // do variable lookup by variable and member names rather than varid temp.declarationId(0); // do variable lookup by variable and member names rather than varid
std::string varnames; // use class and member name for messages std::string varnames; // use class and member name for messages
for (std::size_t k = 0; k < varname.size(); ++k) for (std::size_t k = 0; k < varname.size(); ++k)
varnames += (k == 0 ? "" : ".") + varname[k]; varnames += (k == 0 ? "" : ".") + varname[k];
temp.varname(varnames); temp.varname(varnames);
@ -1661,7 +1661,7 @@ CheckBufferOverrun::ArrayInfo CheckBufferOverrun::ArrayInfo::limit(MathLib::bigi
{ {
MathLib::bigint uvalue = std::max(MathLib::bigint(0), value); MathLib::bigint uvalue = std::max(MathLib::bigint(0), value);
MathLib::bigint n = 1; MathLib::bigint n = 1;
for (std::size_t i = 0; i < _num.size(); ++i) for (std::size_t i = 0; i < _num.size(); ++i)
n *= _num[i]; n *= _num[i];
if (uvalue > n) if (uvalue > n)
n = uvalue; n = uvalue;

View File

@ -67,7 +67,7 @@ private:
TEST_CASE(uninitvar2_while); TEST_CASE(uninitvar2_while);
TEST_CASE(uninitvar2_4494); // #4494 TEST_CASE(uninitvar2_4494); // #4494
TEST_CASE(uninitvar2_malloc); // malloc returns uninitialized data TEST_CASE(uninitvar2_malloc); // malloc returns uninitialized data
TEST_CASE(uninitvar7); // ticket #5971 TEST_CASE(uninitvar7); // ticket #5971
TEST_CASE(syntax_error); // Ticket #5073 TEST_CASE(syntax_error); // Ticket #5073
@ -2636,17 +2636,17 @@ private:
ASSERT_EQUALS("[test.c:4]: (error) Uninitialized variable: ab\n", errout.str()); ASSERT_EQUALS("[test.c:4]: (error) Uninitialized variable: ab\n", errout.str());
} }
void uninitvar7() { void uninitvar7() {
const char code[] = "void eDBauth_user() {\n" const char code[] = "void eDBauth_user() {\n"
" char *blid_cert;\n" " char *blid_cert;\n"
" if( ) {\n" " if( ) {\n"
" blid_cert = ;\n" " blid_cert = ;\n"
" } \n" " } \n"
"}\n"; "}\n";
// Assume dfs is a non POD type if file is C++ // Assume dfs is a non POD type if file is C++
checkUninitVar2(code, "test.cpp"); checkUninitVar2(code, "test.cpp");
} }
// Handling of function calls // Handling of function calls
void uninitvar2_func() { void uninitvar2_func() {