Commit cf8eaa43 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Fix compile error: error: variable 'b' set but not used [-Werror=unused-but-set-variable]

Summary: Fix compile error: error: variable 'b' set but not used [-Werror=unused-but-set-variable]

Reviewed By: yfeldblum

Differential Revision: D7471259

fbshipit-source-id: 784e874200bb44ec9bddf4a3c12f7a90be12d17b
parent 7d31a7ef
...@@ -127,8 +127,7 @@ TEST(Poly, EqualityComparable) { ...@@ -127,8 +127,7 @@ TEST(Poly, EqualityComparable) {
// mismatched types throws // mismatched types throws
Poly<IEqualityComparable> p = 4.2; Poly<IEqualityComparable> p = 4.2;
Poly<IEqualityComparable> q = 42; Poly<IEqualityComparable> q = 42;
bool b; EXPECT_THROW((void)(q == p), BadPolyCast);
EXPECT_THROW(b = (q == p), BadPolyCast);
} }
} }
...@@ -176,9 +175,8 @@ TEST(Poly, StrictlyOrderable) { ...@@ -176,9 +175,8 @@ TEST(Poly, StrictlyOrderable) {
// mismatched types throws // mismatched types throws
Poly<IStrictlyOrderable> p = 4.2; Poly<IStrictlyOrderable> p = 4.2;
Poly<IStrictlyOrderable> q = 42; Poly<IStrictlyOrderable> q = 42;
bool b; EXPECT_THROW((void)(p < q), BadPolyCast);
EXPECT_THROW(b = (p < q), BadPolyCast); EXPECT_THROW((void)(q < p), BadPolyCast);
EXPECT_THROW(b = (q < p), BadPolyCast);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment