From 16ea8260e957e2b336ca4e881d9951d6046048cf Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Wed, 10 Jul 2024 15:56:34 +0000 Subject: [PATCH] timespec-sub: Fix compilation error on clang. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Gerd Möllmann at . * lib/timespec-sub.c (timespec_sub): Use 'int' as type of variable. Copyright-paperwork-exempt: Yes --- ChangeLog | 8 ++++++++ lib/timespec-sub.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 29d02be979..e43d26a02b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-07-10 Pip Cet + + timespec-sub: Fix compilation error on clang. + Reported by Gerd Möllmann at + . + * lib/timespec-sub.c (timespec_sub): Use 'int' as type of variable. + Copyright-paperwork-exempt: Yes + 2024-07-06 Bruno Haible pthread-cond: Fix compilation error on native Windows. diff --git a/lib/timespec-sub.c b/lib/timespec-sub.c index f6d948780e..38f9c6a4dc 100644 --- a/lib/timespec-sub.c +++ b/lib/timespec-sub.c @@ -31,7 +31,7 @@ struct timespec timespec_sub (struct timespec a, struct timespec b) { int nsdiff = a.tv_nsec - b.tv_nsec; - bool borrow = nsdiff < 0; + int borrow = nsdiff < 0; time_t rs; int rns; bool v = ckd_sub (&rs, a.tv_sec, b.tv_sec); -- 2.39.5