[libcxx-commits] [libcxx] [libc++] avoid a GCC -Wsigned-compare warning where time_t is unsigned (PR #76560)

YAMAMOTO Takashi via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 3 20:22:16 PST 2024


================
@@ -44,7 +44,7 @@ void condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
   seconds s = duration_cast<seconds>(d);
   typedef decltype(ts.tv_sec) ts_sec;
   constexpr ts_sec ts_sec_max = numeric_limits<ts_sec>::max();
-  if (s.count() < ts_sec_max) {
+  if ((unsigned long long)s.count() < ts_sec_max) {
----------------
yamt wrote:

ok. i will try it later.


https://github.com/llvm/llvm-project/pull/76560


More information about the libcxx-commits mailing list