Fix warnings about incompatible pointer types