Menu

function never used / "Unused private function false positives

2023-03-12
2023-03-12
  • Edward Welch

    Edward Welch - 2023-03-12

    I just started using cppcheck on my project and so far if found a huge number of hard to find bugs. So thanks for making such a great tool.
    Unfortunately, it's throwing up quite a lot of warnings "Unused private function " and "function not used", where the function actually is used.

     
  • Daniel Marjamäki

    It would be nice with a test case that reproduce the unused private function. Reduced as much as you can.

    About the "function not used".. does cppcheck see the function usage in the same analysis? Then how is the function used is there a direct function call or is it used indirectly somehow? Can a minimal test case be created?

     

Log in to post a comment.