fix analyzer warnings:
Method accepting NSError** should have a non-void return value to indicate whether or not an error occurred
Potential null dereference.  According to coding standards in 'Creating and Returning NSError Objects' the parameter may be null
Merge pull request #391 from paulz/fix-warnings

fix analyzer warnings