fix pedantic errors for latest gcc