User Activity

  • Posted a comment on discussion Development on cppcheck

    When --cppheck-build-dir "cache" is created without the --check-level=exhaustive first, using --check-level=exhaustive seems to have no effect and CheckLevelMaxBranches warning is still printed. Removing the "cache" dir helps. I have not tested any other order of operations, e.g. creating cache with exhaustive level first and then not using the exhaustive level option but reusing the cache directory.

  • Posted a comment on discussion Development on cppcheck

    What about the unused function warning? It seems to be happening a lot for Gtest tests, but des not happen always. I cannot see the pattern in yet.

  • Modified a comment on discussion Development on cppcheck

    This is a bit shorter and still produces the same error struct Struct { int member1; }; int main() { Struct s {}; auto& [member1] = s; member1 = 42; return 0; }

  • Modified a comment on discussion Development on cppcheck

    This is a bit shorter and still produces the same error #include <vector> struct Struct { std::vector<int> member1; }; int main() { Struct s; auto& [member1] = s; member1.push_back(42); return 0; }

  • Posted a comment on discussion Development on cppcheck

    This is a bit shorter and still produces the same error #include <vector> struct Struct { std::vector<int> member1; std::vector<int> member2; }; int main() { Struct s; auto& [member1, member2] = s; member1.push_back(42); member2.push_back(42); return 0; }

  • Posted a comment on discussion Development on cppcheck

    #include <vector> struct Struct { std::vector<int> member1; std::vector<int> member2; }; void f(Struct* s) { auto& [member1, member2] = *s; member1.push_back(42); member2.push_back(42); } int main() { Struct s; f(&s); return 0; } $ cppcheck --version Cppcheck 2.15.0 $ cppcheck --enable=all test.cpp --suppress=missingIncludeSystem --suppress=checkersReport Checking test.cpp ... test.cpp:5:22: style: struct member 'Struct::member1' is never used. [unusedStructMember] std::vector<int> member1; ^ test.cpp:6:22:...

  • Posted a comment on discussion Development on cppcheck

    #include <gtest/gtest.h> namespace Namespace { class TestClass : public testing::Test { public: std::string const ApplicationName = "TestApp"; }; TEST_F(TestClass, testCase) { ASSERT_NO_THROW(std::string(ApplicationName)); } } $ cppcheck --version Cppcheck 2.15.0 $ cppcheck --library=googletest --enable=all test.cpp Checking test.cpp ... test.cpp:1:0: information: Include file: <gtest/gtest.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]...

  • Modified a comment on discussion General Discussion on cppcheck

    Removed comment.

View All

Personal Data

Username:
gnivirht
Joined:
2023-07-14 09:18:47.122000

Projects

  • No projects to display.

Personal Tools