Cast to pointer first

Fix: for Android Studio, unable to build with flag -Werror