fix g++ warnings