fix(code-analysis): address some code anlaysis warnings.