Compile without warnings.

Fixes implicit pointer conversions, removes useless statements, and deletes unused variables.
`-Werror` is meant for debugging code, not building release state code as it is used here.  This will almost certainly cause the build to fail on more systems.