Re #8997. Fix gcc warnings