Static Analyzer possible errata for Xcode 4.5


I went through this chapter using Xcode 4.5.2 and iOS6 and I could not generate the error in the Static Analyzer section from the example code.

- (int)numberOfLines
  int count;

  if (linesInProcess && completeLines)
    count = [linesInProcess count] + [completeLines count];

    return count;

This did not generate an error when I ran it through the static analyzer. I even initialized the count variable to nil but nothing happened. Is it possible the compiler can catch these things and fix them in my version of Xcode?


@lazzarello, I’m using same build tools/config as you but I do see the Static Analyzer note as described in the book.