fixing a bunch of GCC compiler warnings