Fixes compiler warnings for mac and ios
Merge pull request #6879 from ricardoquesada/warnings_fixes

Fixes compiler warnings for mac and ios