Simplify an expression and eliminate a compile warning