cleanup: Fix warnings found by cppcheck

Fix various warnings found by cppcheck.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I4db2319f5890d7aa73c8f418f610a6cba338ce24
10 files changed