diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-08-24 11:42:17 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-08-24 13:44:38 +0100 |
commit | d6271d600d5a181b37093c8984990806a743f16a (patch) | |
tree | 0a7e4c43b923c379d43945d87521d1f5789c3c28 | |
parent | e64ad2c84f5ff1922b3f4f5a9af0ad03280e52e1 (diff) | |
download | gcc-d6271d600d5a181b37093c8984990806a743f16a.zip gcc-d6271d600d5a181b37093c8984990806a743f16a.tar.gz gcc-d6271d600d5a181b37093c8984990806a743f16a.tar.bz2 |
libstdc++: Fix -Wunused-but-set-variable in std::format_to test
libstdc++-v3/ChangeLog:
* testsuite/std/format/functions/format_to.cc: Avoid warning for
unused variables.
-rw-r--r-- | libstdc++-v3/testsuite/std/format/functions/format_to.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/testsuite/std/format/functions/format_to.cc b/libstdc++-v3/testsuite/std/format/functions/format_to.cc index a355689..c5c3c50 100644 --- a/libstdc++-v3/testsuite/std/format/functions/format_to.cc +++ b/libstdc++-v3/testsuite/std/format/functions/format_to.cc @@ -69,14 +69,14 @@ test_move_only() { std::string str; move_only_iterator mo(std::back_inserter(str)); - auto res = std::format_to(std::move(mo), "for{:.3} that{:c}", - "matte", (int)'!'); + [[maybe_unused]] auto res + = std::format_to(std::move(mo), "for{:.3} that{:c}", "matte", (int)'!'); VERIFY( str == "format that!" ); std::vector<wchar_t> vec; move_only_iterator wmo(std::back_inserter(vec)); - auto wres = std::format_to(std::move(wmo), L"for{:.3} hat{:c}", - L"matte", (long)L'!'); + [[maybe_unused]] auto wres + = std::format_to(std::move(wmo), L"for{:.3} hat{:c}", L"matte", (long)L'!'); VERIFY( std::wstring_view(vec.data(), vec.size()) == L"format hat!" ); } |