fix warnings emitted by clang
Merge pull request #2469 from WalterBright/fix-clang-warnings

fix warnings emitted by clang