libstdc++: Fix some warnings seen during mingw-w64 bootstrap

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.
This commit is contained in:
Jonathan Wakely
2025-12-18 23:37:35 +00:00
committed by Jonathan Wakely
parent 7ad39bc909
commit 0b22234b87
2 changed files with 3 additions and 2 deletions

View 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;

View 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;