Use static_cast instead of reinterpret_cast to cast void pointers