Fix warnings

This patch clears all remaining warnings encountered with -Wall
-Wextra on gcc 4.2.1.

There's not much else to say about it, it's generally not a patch
which will affect functionality, just cleans up the compiler output a
little bit.