fixes some compiler warnings

don't call deprecated functions
Merge pull request #9040 from ricardoquesada/warnings_fixes

fixes some compiler warnings