[GCC 4.4] Fix warnings on some ancient compilers.
[GCC 4.4] More warning fixes.
[GCC 4.4] Workaround GCC 4.4 pragmas.

Sad, but GCC 4.4 has no pragma diagnostic push/pop support.