Fix 5 -Wuseless-cast warnings from gcc 14.1
No need to cast things to the exact type they're already defined as being.
Also fix up a bonus needless cast gcc didn't warn about (the argument to repaint_window can use the already-converted variable we've been using in the rest of the function).
Signed-off-by: Alan Coopersmith