Fix some warnings that prevent building with -Werror