make compile with g++ (fix invalid cast from ‘void*’)

allow compilation with g++ adding a cast