Fix compilation warnings
Merge pull request #3845 from wmtan/FixCompilationWarnings

Fix compilation warnings