diff options
author | Eli Fidler <efidler@topologyinc.com> | 2016-05-31 18:32:17 +0300 |
---|---|---|
committer | Eli Fidler <efidler@topologyinc.com> | 2016-06-13 17:24:26 +0300 |
commit | 035271091faa49734f40782b6cfad254b0302fa2 (patch) | |
tree | c1111154d79526e7430f2a2b8add764ba279270f | |
parent | 13e3aa9b00eac83bac9f67b8adf86a9ae18cca27 (diff) |
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"
-rw-r--r-- | test/unittest/schematest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unittest/schematest.cpp b/test/unittest/schematest.cpp index d1027ad5..d75b1e59 100644 --- a/test/unittest/schematest.cpp +++ b/test/unittest/schematest.cpp @@ -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());\ |