Resolving clang analyzer issues found in Xcode5

This resolves a few small analyzer issues found via xcode 5's static analyzer. The analyze action in xcode to my knowledge cannot exclude certain projects and I'd love to have a clean analyze step for continuous integration purposes.