Skip to content

Commit be39f9a

Browse files
Quuxplusonemartinmoene
authored andcommitted
Silence Clang warnings about unused variables. NFC.
warning: unused variable 'nullopt' [-Wunused-const-variable] 2284 | const nullopt_t nullopt{}; | ^~~~~~~ warning: unused variable 'u' [-Wunused-variable] 610 | nonstd::unexpected<int> u{7}; | ^
1 parent 48e5e22 commit be39f9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/expected.t.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ CASE( "make_unexpected_from_current_exception(): Allows to create an unexpected_
607607
CASE( "unexpected: C++17 and later provide unexpected_type as unexpected" )
608608
{
609609
#if nsel_CPP17_OR_GREATER || nsel_COMPILER_MSVC_VERSION > 141
610-
nonstd::unexpected<int> u{7};
610+
[[maybe_unused]] nonstd::unexpected<int> u{7};
611611
#else
612612
EXPECT( !!"unexpected is not available (no C++17)." );
613613
#endif
@@ -2281,7 +2281,7 @@ CASE( "invoke" )
22812281

22822282
struct nullopt_t{};
22832283

2284-
const nullopt_t nullopt{};
2284+
[[maybe_unused]] const nullopt_t nullopt{};
22852285

22862286
/// optional expressed in expected
22872287

0 commit comments

Comments
 (0)