fix -Wincompatible-pointer-types