FWIW: results of cppcheck on dmd sources

Walter Bright newshound2 at digitalmars.com
Tue Jun 19 12:08:37 PDT 2012


On 6/19/2012 10:29 AM, Brad Anderson wrote:
> CppCheck is actually how I found the two bugs I fixed recently
> (CtfeStack::maxStackPointer and ComplexExp::toChars). I spent a couple hours
> going through the results of CppCheck but only found those two actual problems
> (plus the third Globals thing that turned out to not be a problem). That's not
> to say I thoroughly investigated every item. There sure are a lot of unused
> variables in DMD :P. I didn't feel qualified to submit a pull request removing
> them as I don't have a very strong understanding of DMD's source code yet.

I think in general fixing cppcheck's complaints makes the code more 
understandable and maintainable, even if it doesn't actually fix anything.

A lot of the cruft in the code comes from the endless turmoil it undergoes :-)



More information about the Digitalmars-d mailing list