Change the source code struct and fix compile warning message.