Author Topic: Checking for unused code (such as #include files)  (Read 4051 times)

daxm

  • Guest
Checking for unused code (such as #include files)
« on: January 13, 2011, 09:05:22 am »
I'm new to Code::Blocks.  I skimmed the User Manual and didn't see anything that relates to checking for code that is unused/(unreachable) or for #include files that are not needed.  Does Code::Blocks have a "app" for these?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Checking for unused code (such as #include files)
« Reply #1 on: January 13, 2011, 09:16:01 am »
You can try the cppcheck plugin. It has some basic checks for unused/unreachable code, but don't expect miracles.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Checking for unused code (such as #include files)
« Reply #2 on: January 13, 2011, 09:43:50 am »
You can try the cppcheck plugin. It has some basic checks for unused/unreachable code, but don't expect miracles.


Butr be aware, that the cppcheck executable is not shipped with C::B, you have to download and install it seperately.
Make sure it is in your systempath if you are on windows.