Resolve some warning and modify uint32_t to long