issue #2770: fix some warning
Merge pull request #4161 from boyu0/iss2770_fix_warnings

[ci skip]issue #2770: fix warning