]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix -Wsign-compare warning in new test
authorJonathan Wakely <jwakely@redhat.com>
Tue, 12 May 2026 16:14:26 +0000 (17:14 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 13 May 2026 17:26:12 +0000 (18:26 +0100)
libstdc++-v3/ChangeLog:

* testsuite/std/time/clock/utc/leap_second_info-2.cc: Fix sign
compare warning. Tweak comment.

libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info-2.cc

index 090a28291c8577201ef158f2b0c2cd89fb52e393..59634b34944f532a1574d022adf32bedf3e0df7f 100644 (file)
@@ -52,7 +52,7 @@ test_future_leaps()
   std::ofstream("leapseconds") << "";
 
   using std::chrono::years;
-  auto s = std::chrono::utc_seconds(1483228826s + years(100)); // 1 Jan 2117
+  auto s = std::chrono::utc_seconds(1483228826s + years(100)); // 2117
   auto lsi = get_leap_second_info(s);
   VERIFY( override_used ); // If this fails then XFAIL for the target.
   VERIFY( lsi.is_leap_second == false );
@@ -91,7 +91,7 @@ Leap  2120    Dec     30      23:59:59        -       S
   // The file was not read again:
   VERIFY( ! override_used );
   // The list in the tzdb contains the three fake leap seconds:
-  VERIFY( tzdb.leap_seconds.size() == hardcoded_count.count() + 3 );
+  VERIFY( tzdb.leap_seconds.size() == size_t(hardcoded_count.count() + 3) );
   // And repeating the queries above gives the same results:
   lsi = get_leap_second_info(s);
   VERIFY( lsi.is_leap_second == false );