Fixed a bunch of new compilation and static analyzer warnings on XCode 5/OS X 10.9.