Fix problems caught with --enable-gcc-warnings