Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast