Fix warnings

After duplicated #147, #148 and #149, this pull request fixes the remaining Xcode warnings except for OCTest deprecated warning.
Could you set these settings in the xcconfig, or remove them from here?