optimize source code to avoid warning message during compiler time.