Fix build warnings on MSVC x64 and OS X clang
Merge pull request #600 from taka-no-me:fix_build_warnings