Fix warnings

After duplicated #147, #148 and #149, this pull request fixes the remaining Xcode warnings except for OCTest deprecated warning.