Fixed Xcode6 related compiler warnings and error.