remove unreachable code reporting
remove useless code
simplify function input type