with recent clang, when expected is false, this code triggers -Wunreachable-code

clang advises: "note: silence by adding parentheses to mark code as explicitly dead"
This commit is contained in:
Eli Fidler 2016-05-31 11:32:17 -04:00
parent 13e3aa9b00
commit 035271091f

View File

@ -111,7 +111,7 @@ TEST(SchemaValidator, Hasher) {
EXPECT_FALSE(d.HasParseError());\
EXPECT_TRUE(expected == d.Accept(validator));\
EXPECT_TRUE(expected == validator.IsValid());\
if (expected && !validator.IsValid()) {\
if ((expected) && !validator.IsValid()) {\
StringBuffer sb;\
validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);\
printf("Invalid schema: %s\n", sb.GetString());\