[PATCH] Fix some warnings due to GCC8's cast-function-type