diff options
Diffstat (limited to 'absl/types/optional_test.cc')
-rw-r--r-- | absl/types/optional_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/types/optional_test.cc b/absl/types/optional_test.cc index d90db9f821b5..fc4f00a4f52f 100644 --- a/absl/types/optional_test.cc +++ b/absl/types/optional_test.cc @@ -1042,9 +1042,9 @@ TEST(optionalTest, Value) { // test exception throw on value() absl::optional<int> empty; #ifdef ABSL_HAVE_EXCEPTIONS - EXPECT_THROW(empty.value(), absl::bad_optional_access); + EXPECT_THROW((void)empty.value(), absl::bad_optional_access); #else - EXPECT_DEATH(empty.value(), "Bad optional access"); + EXPECT_DEATH((void)empty.value(), "Bad optional access"); #endif // test constexpr value() |