Fix a few compile-time warnings
Merge pull request #3829 from ussuri/small-fixes-4

Fix a few compile-time warnings