]> Savannah Git Hosting - gnulib.git/commitdiff
timespec-sub: Fix compilation error on clang.
authorPip Cet <pipcet@protonmail.com>
Wed, 10 Jul 2024 15:56:34 +0000 (15:56 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Jul 2024 16:14:46 +0000 (18:14 +0200)
* lib/timespec-sub.c (timespec_sub): Use 'int' as type of variable.
Copyright-paperwork-exempt: Yes

ChangeLog
lib/timespec-sub.c

index 21db18416b557d3111119473c9ba8c8fc51f7d98..3b6e500a23126a5523ead0cc8982ab913e0e945b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-07-10  Pip Cet  <pipcet@protonmail.com>
+
+       timespec-sub: Fix compilation error on clang.
+       * lib/timespec-sub.c (timespec_sub): Use 'int' as type of variable.
+       Copyright-paperwork-exempt: Yes
+
 2024-07-06  Bruno Haible  <bruno@clisp.org>
 
        pthread-cond: Fix compilation error on native Windows.
index f6d948780e4dfa9cc3a6a8c0c83a13f21ff1dad5..38f9c6a4dc29c1a71d3a911c90d095fb5a60f10f 100644 (file)
@@ -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);