Menu

#7 cppcheck plugin yields false positives

1.0
closed
nobody
None
2017-04-25
2016-11-09
No

In my geometry.h file I used:

class Position
{
private:
    /**/
public:
    /**/
    Position(int x, int y);
    static const Position origin();
};

in the geometry.cc file

const Position Position::origin()
{
    return Position(0, 0);
}

Then the check done by the plugin yields:
[geometry.cc:68]: (style) The function 'origin' is never used.
The same output appears if the command is used:
cppcheck --enable=all *.cc
On the other, hand the following command doesn't list any unused functions
cppcheck --enable=all .

Discussion

  • Marcin Mielniczuk

    Oh, I read this once again and this is an usptream problem. Please close this.

     
  • Gres

    Gres - 2017-04-25
    • status: open --> closed
     

Log in to post a comment.