g++ compiler warning fix