fix most of warnings
Merge pull request #5847 from skv-headless/fix_deprecation_warnings

fix most of warnings