User Activity

  • Posted a comment on discussion Development on cppcheck

    Hi, due to the latest commits some FPs of this kind show up: Code: foo::foo(const std::string &prefix) : m_DynLogger(prefix.c_str()) { m_LogInterface.pfDiagnostic = &logDiagnostic; m_LogInterface.pfError = &logError; } Output: [foo.cpp:23] -> [foo.hpp:45]: (style) Virtual function 'logDiagnostic' is called from constructor 'VocalizerLogInterface(const std::string&prefix)' at line 23. Dynamic binding is not used. [foo.cpp:24] -> [foo.hpp:51]: (style) Virtual function 'logError' is called from constructor...

  • Modified a comment on discussion General Discussion on cppcheck

    Hi, due to https://github.com/danmar/cppcheck/commit/850ad0fed97839ff48a187a30dd1c06b5972d873 now a huge number of issues occurs in our code regarding "unused casts". Although the checker is correct for these cases: static_cast<void>(param); (void)param; I wonder if it makes sense to warn for them. Casting unused parameters to void is quite common practice I would say, see f.e. https://stackoverflow.com/questions/4647665/why-cast-an-unused-function-parameter-value-to-void Maybe if the type is 'void'...

  • Posted a comment on discussion General Discussion on cppcheck

    Hi, due to https://github.com/danmar/cppcheck/commit/850ad0fed97839ff48a187a30dd1c06b5972d873 now a huge number of issues occurs in our code regarding "unused casts". Although the checker is correct for these cases: static_cast<void>(param); (void)param; I wonder if it makes sense to warn for them. Casting unused parameters to void is quite common practice I would say, see f.e. https://stackoverflow.com/questions/4647665/why-cast-an-unused-function-parameter-value-to-void Maybe if the type 'void'...

  • Posted a comment on discussion Development on cppcheck

    Hi, the code #if __has_include(<bar/bar2/bar3.hpp>) foo() #endif leads to (error) failed to evaluate #if condition, division/modulo by zero for cppcheck head. Could you please check? Thanks, Martin

  • Posted a comment on discussion Development on cppcheck

    Hi, recently one very large file of ours cannot be analyzed any more, the analysis ends in a segfault. With 9f6a36c1a8a417838b04ceeb146b0bd2f0c0c1b0 it worked, with f2a419653cecc19e1c1a0cae6bb9016725e0f2a1 it doesn't. My guess (!) is that is has something to do with this commit: https://github.com/danmar/cppcheck/commit/f2a419653cecc19e1c1a0cae6bb9016725e0f2a1 At least it is one that doesn't "just fix a FP". Also, there's a resulting segfault mentioned in the link above. Does anyone else have a problem...

  • Posted a comment on discussion Development on cppcheck

    Hi, with f2a419653cecc19e1c1a0cae6bb9016725e0f2a1 there's a new syntax error: foo::foo() : m_bar{(x > 0) ? new uint32_t[x]{} : new uint32_t[1]{}}, {} Output is: error: Syntax Error: AST broken, ternary operator lacks ':'. [internalAstError] : m_bar{(x > 0) ? new uint32_t[x]{} : new uint32_t[1]{}}, Could you please check? Thanks, Martin

  • Posted a comment on discussion Development on cppcheck

    Same goes for: void foo(Bar& bar) { const auto baz = [](const decltype(bar.p1)::value_type& p2) { return 0; }; } cppcheck says: /foo.cpp:3:39: error: Syntax Error: AST broken, 'bar' doesn't have a parent. [internalAstError] const auto baz = [](const decltype(bar.p1)::value_type& p2) { ^

  • Posted a comment on discussion Development on cppcheck

    Hi all. there's a new syntax error occurring with cppcheck head. With 7406dd8c941a60ba111dd4857dce0b99c54eef79 it appeared. With 12abf85d1d63e87edfeab8533e025ee7aec45a89 it wasn't there. Example code is: auto createArgv(const std::vector<std::string> &arguments) -> std::unique_ptr<const char *[]> { auto argv = cpp14::make_unique<const char *[]>(arguments.size() + 1); for (decltype(arguments.size()) i = 0; i < arguments.size(); ++i) { argv[i] = arguments[i].c_str(); } } cppcheck output is: /foo.cpp:4:18:...

View All

Personal Data

Username:
martin-meyer
Joined:
2015-10-27 09:49:27

Projects

  • No projects to display.

Personal Tools