]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix some warnings seen during mingw-w64 bootstrap
authorJonathan Wakely <jwakely@redhat.com>
Thu, 18 Dec 2025 23:37:35 +0000 (23:37 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 18 Dec 2025 23:40:43 +0000 (23:40 +0000)
libstdc++-v3/ChangeLog:

* include/bits/chrono_io.h (__formatter_chrono::_M_write): Add
maybe_unused attribute to avoid -Wunused-parameter warning.
* src/c++20/tzdb.cc (detect_windows_zone): Decay array to
pointer to avoid -Warray-compare warning.

libstdc++-v3/include/bits/chrono_io.h
libstdc++-v3/src/c++20/tzdb.cc

index 3b1f5862cba61902c6a2d385fbd1c0893b020eb4..75dd532a8cb396cb601e829c48c67c4e61ae0976 100644 (file)
@@ -919,7 +919,8 @@ namespace __format
     private:
       template<typename _OutIter>
        _OutIter
-       _M_write(_OutIter __out, const locale& __loc, __string_view __s) const
+       _M_write(_OutIter __out, [[maybe_unused]] const locale& __loc,
+                __string_view __s) const
        {
 #if defined _GLIBCXX_USE_NL_LANGINFO_L && __CHAR_BIT__ == 8
          __sso_string __buf;
index 77b283fb699096cb9fcf14365a77496406e53bcf..53441880ae6e0c407e30977a76da0c49929c1f46 100644 (file)
@@ -1854,7 +1854,7 @@ namespace std::chrono
        return zone_range.front().iana_name;
 
       const auto iter = ranges::lower_bound(
-         zone_range, territory, {}, &windows_zone_map_entry::territory);
+         zone_range, +territory, {}, &windows_zone_map_entry::territory);
       if (iter == zone_range.end() || iter->territory != territory)
        // Territory not within the the map, use "001".
        return zone_range.front().iana_name;