From: Jonathan Wakely Date: Tue, 12 May 2026 16:14:26 +0000 (+0100) Subject: libstdc++: Fix -Wsign-compare warning in new test X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=754da29afd63cd079ee0921fab346bc212dd0fe7;p=thirdparty%2Fgcc.git libstdc++: Fix -Wsign-compare warning in new test libstdc++-v3/ChangeLog: * testsuite/std/time/clock/utc/leap_second_info-2.cc: Fix sign compare warning. Tweak comment. --- diff --git a/libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info-2.cc b/libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info-2.cc index 090a28291c8..59634b34944 100644 --- a/libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info-2.cc +++ b/libstdc++-v3/testsuite/std/time/clock/utc/leap_second_info-2.cc @@ -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 );