Clean clang warning

Simply do some clean work. Some of the unused variables are not removed because I think they may be used in the future.