Gcc warning cleanup

Fixes warnings that broke the build with g++ (GCC) 4.1.2.