Remove useless casts

Suggested by mpi@.