Fix compiler warnings about pointer integer conversion