solve the warning for mac gcc compiler.