Fix several gcc warnings