Remove redundant cast expressions