gcc 4.x has no option short of -Werror to error on "makes pointer from
integer without a cast" or "incompatible pointer type" warnings, but
clang and (I think) gcc 5.x do. Use -Werror=int-conversion and
-Werror=incompatible-pointer-types when the compiler supports them.
At least in clang, -Werror=incompatible-pointer-types also throws an
error when passing an argument discards a const qualifier, which is a
less serious type violation. But cleaning those up is relatively easy.