Menu

commit 7a6d7f7c2de984 cause compile failure

2021-08-03
2021-08-03
  • masanari iida

    masanari iida - 2021-08-03

    Hello
    commit 7a6d7f7c2de984 added a compile failure.
    This is a fix.

    $ git diff
    diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp
    index e8cc4d82f936..abe39df3b9bf 100644
    --- a/lib/valueflow.cpp
    +++ b/lib/valueflow.cpp
    @@ -2605,7 +2605,8 @@ static Analyzer::Result valueFlowForward(Token top,
    const std::list<valueflow::value>& values,
    TokenList</valueflow::value>
    const tokenlist,
    const Settings settings)
    -//
    INDENT-ON {
    +//
    INDENT-ON
    +{
    Analyzer::Result result{};
    for (const ValueFlow::Value& v : values)
    {
    @@ -6246,7 +6247,8 @@ static Analyzer::Result valueFlowContainerForwardRecursive(Token
    top,
    const Token exprTok,
    const ValueFlow::Value& value,
    TokenList
    tokenlist)
    -// INDENT-ON {
    +// INDENT-ON
    +{
    ContainerExpressionAnalyzer a(exprTok, value, tokenlist);
    return valueFlowGenericForward(top, a, tokenlist->getSettings());
    }

    This bug was found by cppcheck :)

    Checking lib/valueflow.cpp ...
    lib/valueflow.cpp:2615:1: error: Unmatched '}'. Configuration: ''. [syntaxError]
    lib/valueflow.cpp:6253:1: error: Unmatched '}'. Configuration: ''. [syntaxError]

     
  • masanari iida

    masanari iida - 2021-08-03

    The commit was reverted. Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.