fix [-Wincompatible-pointer-types] warning