Fix unused variable compiler warnings.
Fix implicit declaration compiler warnings.
Fix other assorted compiler warnings.

Unused functions, uninitialized variable access, and incorrect return types.
Fix that pesky int pointer cast compiler warning.

Now it just uses (void *)s for everything, avoiding conversion altogether.
Fixed printf format warnings when building 32-bit.