Fix warnings from XCode analyzer

Fixes GH-71.
Merge pull request #72 from box/xcode-analyzer-warnings

Fix warnings from XCode analyzer