fix warnings and analyze in xcode5