Fix warning: pointer of type ‘void *’ used in arithmetic