solve more warning for mac g++ compiler.