From a81fbf83672d275ae693b7cb7c00cb52155f4d7b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 21 Nov 2021 03:48:27 +0000 Subject: [PATCH] Fix compiler warnings * src/haikuterm.c (haiku_read_socket): Fix compiler warnings intoduced by last change. --- src/haikuterm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/haikuterm.c b/src/haikuterm.c index 6b3c5dbe483..6304d9bcd3c 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -3005,14 +3005,16 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) if (signbit (py) != signbit (b->delta_y)) py = 0; - px += b->delta_x * pow (FRAME_PIXEL_HEIGHT (f), 2.0 / 3.0); - py += b->delta_y * pow (FRAME_PIXEL_HEIGHT (f), 2.0 / 3.0); + px += (b->delta_x + * powf (FRAME_PIXEL_HEIGHT (f), 2.0f / 3.0f)); + py += (b->delta_y + * powf (FRAME_PIXEL_HEIGHT (f), 2.0f / 3.0f)); if (fabsf (py) >= FRAME_LINE_HEIGHT (f) || fabsf (px) >= FRAME_COLUMN_WIDTH (f) || !x_coalesce_scroll_events) { - inev.kind = (fabsf (px) > fabs (py) + inev.kind = (fabsf (px) > fabsf (py) ? HORIZ_WHEEL_EVENT : WHEEL_EVENT); inev.code = 0; -- 2.39.2