Fix g++ warning about void* used in arithmetic