On Fri, Jun 24, 2011 at 1:36 PM, Matt Turner <matts...@gmail.com> wrote: > On Fri, Jun 24, 2011 at 12:31 PM, Harley Laue > <losinggenerat...@gmail.com> wrote: >> After seeing John Carmack talking about PC-lint (a commercial static >> code analyzer) on Twitter, it got me thinking about what possibilities >> we have in the open source world. I decided to give Clang Static >> Analyzer a try against ioquake3. I've posted the results (at least for >> the time being) here: >> http://losinggeneration.homelinux.org/wp-upload/scan-build-2011-06-24-1/index.html >> >> It looks like there may be some false positives such as: >> http://losinggeneration.homelinux.org/wp-upload/scan-build-2011-06-24-1/report-PZ7pf6.html#EndPath >> Which looks like it should be a non-issue since Com_Error ends >> execution (assuming I'm reading the code correctly.) If that is indeed >> the case, it looks like many of the "errors" are because the analyzer >> couldn't figure that out. >> >> Anyways, I thought others might find it interesting to look through as >> well. IMO, the "Dead initialization" are kind of interesting. > > It's been my experience that people with ioquake3 commit access don't > like code churn for little or no benefit, so things like dead > assignments are generally ignored. > > It's a lot of work for questionable gain, so. > > Matt
While I mostly agree that the Dead classification of issues here don't hurt anything, looking back through the commits, there are lots of cases where code is committed to fix compiler warnings. GCC detects obvious unused variables, and these are a bit more thorough. I only pointed those out because there are very few (3) Dead initializations, but many (219) Dead assignments. I don't really anticipate the results having any affect on the code base. Though, it would be kind of cool if it ended up finding any real issues that may have been overlooked. Anyways, those are only one classification, and I only pointed it out because I find code that serves no purpose to be kind of interesting :) _______________________________________________ ioquake3 mailing list ioquake3@lists.ioquake.org http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org By sending this message I agree to love ioquake3 and libsdl.