fix a few warnings from newer versions of gcc