Fix warnings about void* pointer arithmetic