My guess is that the cast is there to suppress a warning. The statement has no effect (which could be what the warning would be if the cast were removed). You would need to ask the original programmer why that line is there; it seems pointless to me.