diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-09-01 16:09:00 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-09-01 16:15:51 -0700 |
commit | b3a041822f36a2bc4c01b5a848a6db21329a8962 (patch) | |
tree | fe2e26db74afbd0d1557e7acbbf899b5537f9e40 | |
parent | 8ef3f9e4ec1e75b24b84ab7ab3fb7a0e2b84b12d (diff) |
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 <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xeyes/-/merge_requests/9>
-rw-r--r-- | Eyes.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -608,7 +608,7 @@ static TPoint computePupil ( cy = layout->y; dy = mouse.y - cy; if (dx == 0 && dy == 0); else { - angle = atan2 ((double) dy, (double) dx); + angle = atan2 (dy, dx); cosa = cos (angle); sina = sin (angle); dist = BALL_DIST; @@ -648,7 +648,7 @@ static TPoint computePupil ( if (dist > BALL_DIST) dist = BALL_DIST; } - if (dist > hypot ((double) dx, (double) dy)) { + if (dist > hypot (dx, dy)) { cx += dx; cy += dy; } else { @@ -923,7 +923,7 @@ static void Redisplay( w->eyes.pupils[i].x = TPOINT_NONE; w->eyes.pupils[i].y = TPOINT_NONE; } - (void) repaint_window ((EyesWidget)gw); + repaint_window (w); } /* ARGSUSED */ |