widl: Remove unnecessary casts in the generated code.