Fix problems found by --enable-gcc-warnings