Skip to content

Commit b27360c

Browse files
[libc++][test] Fix Clang -Wunused-variable warnings in time.zone.members/to_sys.pass.cpp (#100504)
1 parent 7b1bb2b commit b27360c

File tree

1 file changed

+8
-8
lines changed
  • libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members

1 file changed

+8
-8
lines changed

libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static void test_nonexistent() {
8989
TEST_VALIDATE_EXCEPTION(
9090
std::chrono::nonexistent_local_time,
9191
[&]([[maybe_unused]] const std::chrono::nonexistent_local_time& e) {
92-
std::string_view what =
92+
[[maybe_unused]] std::string_view what =
9393
R"(1986-03-30 02:30:00.000000000 is in a gap between
9494
1986-03-30 02:00:00 CET and
9595
1986-03-30 03:00:00 CEST which are both equivalent to
@@ -103,7 +103,7 @@ static void test_nonexistent() {
103103
TEST_VALIDATE_EXCEPTION(
104104
std::chrono::nonexistent_local_time,
105105
[&]([[maybe_unused]] const std::chrono::nonexistent_local_time& e) {
106-
std::string_view what =
106+
[[maybe_unused]] std::string_view what =
107107
R"(1986-03-30 02:30:00.000000 is in a gap between
108108
1986-03-30 02:00:00 CET and
109109
1986-03-30 03:00:00 CEST which are both equivalent to
@@ -117,7 +117,7 @@ static void test_nonexistent() {
117117
TEST_VALIDATE_EXCEPTION(
118118
std::chrono::nonexistent_local_time,
119119
[&]([[maybe_unused]] const std::chrono::nonexistent_local_time& e) {
120-
std::string_view what =
120+
[[maybe_unused]] std::string_view what =
121121
R"(1986-03-30 02:30:00.000 is in a gap between
122122
1986-03-30 02:00:00 CET and
123123
1986-03-30 03:00:00 CEST which are both equivalent to
@@ -131,7 +131,7 @@ static void test_nonexistent() {
131131
TEST_VALIDATE_EXCEPTION(
132132
std::chrono::nonexistent_local_time,
133133
[&]([[maybe_unused]] const std::chrono::nonexistent_local_time& e) {
134-
std::string_view what =
134+
[[maybe_unused]] std::string_view what =
135135
R"(1986-03-30 02:30:00 is in a gap between
136136
1986-03-30 02:00:00 CET and
137137
1986-03-30 03:00:00 CEST which are both equivalent to
@@ -173,7 +173,7 @@ static void test_ambiguous() {
173173
TEST_VALIDATE_EXCEPTION(
174174
std::chrono::ambiguous_local_time,
175175
[&]([[maybe_unused]] const std::chrono::ambiguous_local_time& e) {
176-
std::string_view what =
176+
[[maybe_unused]] std::string_view what =
177177
R"(1986-09-28 02:30:00.000000000 is ambiguous. It could be
178178
1986-09-28 02:30:00.000000000 CEST == 1986-09-28 00:30:00.000000000 UTC or
179179
1986-09-28 02:30:00.000000000 CET == 1986-09-28 01:30:00.000000000 UTC)";
@@ -186,7 +186,7 @@ static void test_ambiguous() {
186186
TEST_VALIDATE_EXCEPTION(
187187
std::chrono::ambiguous_local_time,
188188
[&]([[maybe_unused]] const std::chrono::ambiguous_local_time& e) {
189-
std::string_view what =
189+
[[maybe_unused]] std::string_view what =
190190
R"(1986-09-28 02:30:00.000000 is ambiguous. It could be
191191
1986-09-28 02:30:00.000000 CEST == 1986-09-28 00:30:00.000000 UTC or
192192
1986-09-28 02:30:00.000000 CET == 1986-09-28 01:30:00.000000 UTC)";
@@ -199,7 +199,7 @@ static void test_ambiguous() {
199199
TEST_VALIDATE_EXCEPTION(
200200
std::chrono::ambiguous_local_time,
201201
[&]([[maybe_unused]] const std::chrono::ambiguous_local_time& e) {
202-
std::string_view what =
202+
[[maybe_unused]] std::string_view what =
203203
R"(1986-09-28 02:30:00.000 is ambiguous. It could be
204204
1986-09-28 02:30:00.000 CEST == 1986-09-28 00:30:00.000 UTC or
205205
1986-09-28 02:30:00.000 CET == 1986-09-28 01:30:00.000 UTC)";
@@ -212,7 +212,7 @@ static void test_ambiguous() {
212212
TEST_VALIDATE_EXCEPTION(
213213
std::chrono::ambiguous_local_time,
214214
[&]([[maybe_unused]] const std::chrono::ambiguous_local_time& e) {
215-
std::string_view what =
215+
[[maybe_unused]] std::string_view what =
216216
R"(1986-09-28 02:30:00 is ambiguous. It could be
217217
1986-09-28 02:30:00 CEST == 1986-09-28 00:30:00 UTC or
218218
1986-09-28 02:30:00 CET == 1986-09-28 01:30:00 UTC)";

0 commit comments

Comments
 (0)