Fix some warnings under Mac OSX(The complier under Mac seems to be more strict).