From 7a6d7f7c2de9846bd12a4bc5aab6c3bb2aba61ec Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Tue, 3 Aug 2021 06:33:54 +0200 Subject: [PATCH] Formatted the code [ci skip] --- lib/valueflow.cpp | 19 +++++++++---------- test/testbufferoverrun.cpp | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 20521adab..e8cc4d82f 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -2605,13 +2605,13 @@ static Analyzer::Result valueFlowForward(Token* top, const std::list& values, TokenList* const tokenlist, const Settings* settings) -// *INDENT-ON* +// *INDENT-ON* { +Analyzer::Result result{}; +for (const ValueFlow::Value& v : values) { - Analyzer::Result result{}; - for (const ValueFlow::Value& v : values) { - result.update(valueFlowGenericForward(top, makeAnalyzer(exprTok, v, tokenlist), settings)); - } - return result; + result.update(valueFlowGenericForward(top, makeAnalyzer(exprTok, v, tokenlist), settings)); +} +return result; } static void valueFlowReverse(Token* tok, @@ -6246,10 +6246,9 @@ static Analyzer::Result valueFlowContainerForwardRecursive(Token* top, const Token* exprTok, const ValueFlow::Value& value, TokenList* tokenlist) -// *INDENT-ON* -{ - ContainerExpressionAnalyzer a(exprTok, value, tokenlist); - return valueFlowGenericForward(top, a, tokenlist->getSettings()); +// *INDENT-ON* { +ContainerExpressionAnalyzer a(exprTok, value, tokenlist); +return valueFlowGenericForward(top, a, tokenlist->getSettings()); } static Analyzer::Result valueFlowContainerForward(Token* startToken, diff --git a/test/testbufferoverrun.cpp b/test/testbufferoverrun.cpp index 44ad035c7..974547bd5 100644 --- a/test/testbufferoverrun.cpp +++ b/test/testbufferoverrun.cpp @@ -4322,7 +4322,7 @@ private: " }\n" " return name;\n" "}\n"); - ASSERT_EQUALS("", errout.str()); + ASSERT_EQUALS("", errout.str()); } void bufferNotZeroTerminated() {