Linux: Fix error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else] with gcc 7.1

This commit is contained in:
Sergey Linev
2017-08-11 16:56:52 +00:00
committed by Marshall Greenblatt
parent 76eb49196e
commit 5b12134a45
8 changed files with 29 additions and 17 deletions

View File

@@ -161,8 +161,9 @@ class TestSchemeHandler : public TestHandler {
#if defined(OS_LINUX)
// CustomStandardXHR* tests are flaky on Linux, sometimes returning
// ERR_ABORTED. Make the tests less flaky by also accepting that value.
if (!(test_results_->expected_error_code == 0 && errorCode == ERR_ABORTED))
if (!(test_results_->expected_error_code == 0 && errorCode == ERR_ABORTED)) {
EXPECT_EQ(test_results_->expected_error_code, errorCode);
}
#else
// Check that the error code matches the expectation.
EXPECT_EQ(test_results_->expected_error_code, errorCode);