fix integer conversion warning in clang