0

I have a simple class with a few const memeber functions and am running through CPPCHECK with the following parametes

cppcheck.exe --includes-file=.\Modules\ --enable=all .\Modules\ --xml 2> .\StaticQuality\error.xml

As you can see I am only analysing a subset of the files in the project ( the rest is legacy code and I dont want to go there!) unusedFunction warning.

But when I take the const out the warnings go away! why is this ? I would like to continue using const methods without it shouting about it.

Edit -

I just take the const keyword out of declaration and defination and it stops complaining. And yes it compiles.

The project that is being analysed is a dll library and cppcheck is camplaining about functions in the API.

NiladriBose
  • 1,849
  • 2
  • 16
  • 31

0 Answers0