Skip to content

Commit

Permalink
Fix warning C4834
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan committed Dec 14, 2023
1 parent 0a3662d commit 8f3bd3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/test/nostd/string_view_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TEST(StringViewTest, SubstrOutOfRange)
{
string_view s = "abc123";
#if __EXCEPTIONS || ((defined(OPENTELEMETRY_STL_VERSION) && (OPENTELEMETRY_STL_VERSION >= 2020)))
EXPECT_THROW(s.substr(10), std::out_of_range);
EXPECT_THROW((void)s.substr(10), std::out_of_range);
#else
EXPECT_DEATH({ s.substr(10); }, "");
#endif
Expand Down

0 comments on commit 8f3bd3e

Please sign in to comment.