Eliminate all the compiling warnings

Refine the code pattern to eliminate compiling warnings!

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>