summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kuehne <thomas@kuehne.cn>2021-12-11 18:00:11 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-05 17:11:01 -0700
commitf2acb1dbd75605d64f07740df2d83e73fe1b2ec3 (patch)
treeb40ce4506ecdc5e829f85207744741a7643a5232
parente075308dccafb6f813ba0a8646b73860a7447a01 (diff)
fix -Wabsolute-value compiler warning
fixes: Clock.c:2011:14: warning: using integer absolute value function ‘abs’ when argument is of floating-point type ‘float’ [-Wabsolute-value] 2011 | (abs(new->clock.update) <= SECOND_HAND_TIME); | ^~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Clock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Clock.c b/Clock.c
index 5b33535..de6beb6 100644
--- a/Clock.c
+++ b/Clock.c
@@ -2016,7 +2016,7 @@ SetValues(Widget gcurrent, Widget grequest, Widget gnew,
(XtPointer) gnew);
new->clock.show_second_hand =
- (abs(new->clock.update) <= SECOND_HAND_TIME);
+ (fabsf(new->clock.update) <= SECOND_HAND_TIME);
if (new->clock.show_second_hand != current->clock.show_second_hand)
redisplay = TRUE;
}