Fix build warning and remove unused code

No match.