Fix gcc warnings on ubuntu