diff --git a/libcxx/test/std/utilities/format/format.range/format.range.fmtdef/format.pass.cpp b/libcxx/test/std/utilities/format/format.range/format.range.fmtdef/format.pass.cpp --- a/libcxx/test/std/utilities/format/format.range/format.range.fmtdef/format.pass.cpp +++ b/libcxx/test/std/utilities/format/format.range/format.range.fmtdef/format.pass.cpp @@ -74,8 +74,9 @@ std::array arg; String result; - OutIt out = std::back_inserter(result); - FormatCtxT format_ctx = test_format_context_create(out, std::make_format_args(arg)); + OutIt out = std::back_inserter(result); + [[maybe_unused]] FormatCtxT format_ctx = + test_format_context_create(out, std::make_format_args(arg)); { // parse not called [[maybe_unused]] const std::formatter formatter; diff --git a/libcxx/test/std/utilities/format/format.range/format.range.fmtmap/format.pass.cpp b/libcxx/test/std/utilities/format/format.range/format.range.fmtmap/format.pass.cpp --- a/libcxx/test/std/utilities/format/format.range/format.range.fmtmap/format.pass.cpp +++ b/libcxx/test/std/utilities/format/format.range/format.range.fmtmap/format.pass.cpp @@ -77,8 +77,9 @@ std::map arg{{parse_call_validator{}, parse_call_validator{}}}; String result; - OutIt out = std::back_inserter(result); - FormatCtxT format_ctx = test_format_context_create(out, std::make_format_args(arg)); + OutIt out = std::back_inserter(result); + [[maybe_unused]] FormatCtxT format_ctx = + test_format_context_create(out, std::make_format_args(arg)); { // parse not called [[maybe_unused]] const std::formatter formatter; diff --git a/libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.pass.cpp b/libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.pass.cpp --- a/libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.pass.cpp +++ b/libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.pass.cpp @@ -77,8 +77,9 @@ std::set arg{parse_call_validator{}}; String result; - OutIt out = std::back_inserter(result); - FormatCtxT format_ctx = test_format_context_create(out, std::make_format_args(arg)); + OutIt out = std::back_inserter(result); + [[maybe_unused]] FormatCtxT format_ctx = + test_format_context_create(out, std::make_format_args(arg)); { // parse not called [[maybe_unused]] const std::formatter formatter; diff --git a/libcxx/test/std/utilities/format/format.range/format.range.formatter/format.pass.cpp b/libcxx/test/std/utilities/format/format.range/format.range.formatter/format.pass.cpp --- a/libcxx/test/std/utilities/format/format.range/format.range.formatter/format.pass.cpp +++ b/libcxx/test/std/utilities/format/format.range/format.range.formatter/format.pass.cpp @@ -78,8 +78,9 @@ std::vector arg{1}; String result; - OutIt out = std::back_inserter(result); - FormatCtxT format_ctx = test_format_context_create(out, std::make_format_args(arg)); + OutIt out = std::back_inserter(result); + [[maybe_unused]] FormatCtxT format_ctx = + test_format_context_create(out, std::make_format_args(arg)); { // parse not called [[maybe_unused]] const std::range_formatter formatter; diff --git a/libcxx/test/std/utilities/format/format.tuple/format.pass.cpp b/libcxx/test/std/utilities/format/format.tuple/format.pass.cpp --- a/libcxx/test/std/utilities/format/format.tuple/format.pass.cpp +++ b/libcxx/test/std/utilities/format/format.tuple/format.pass.cpp @@ -78,8 +78,9 @@ std::pair arg; String result; - OutIt out = std::back_inserter(result); - FormatCtxT format_ctx = test_format_context_create(out, std::make_format_args(arg)); + OutIt out = std::back_inserter(result); + [[maybe_unused]] FormatCtxT format_ctx = + test_format_context_create(out, std::make_format_args(arg)); { // parse not called [[maybe_unused]] const std::formatter formatter;