diff options
author | Kelly Ledford <kelly.ledford@intel.com> | 2017-07-27 15:12:27 -0700 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2017-07-28 09:59:25 +0800 |
commit | f5369347a4b033e08c4e94d2e5433e7c5963a7e8 (patch) | |
tree | 03598f601d76734900d71bdf0da05146296dcdd3 /test | |
parent | 7f50a13b4eb93ddd2a52b2ebb1c2f7554c23ccb8 (diff) | |
download | libva-intel-driver-f5369347a4b033e08c4e94d2e5433e7c5963a7e8.tar.gz |
test: fix GCC 7.1.1 warnings/errors
Fixes #236: add explicit braces to avoid 'ambiguous else' warning.
Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/i965_config_test.cpp | 3 | ||||
-rw-r--r-- | test/i965_test_environment.cpp | 3 | ||||
-rw-r--r-- | test/i965_test_fixture.cpp | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/test/i965_config_test.cpp b/test/i965_config_test.cpp index 3370bc58..f0c9f269 100644 --- a/test/i965_config_test.cpp +++ b/test/i965_config_test.cpp @@ -58,6 +58,7 @@ TEST_P(I965ConfigTest, Create) EXPECT_STATUS_EQ(expect, actual); - if (actual != VA_STATUS_SUCCESS) + if (actual != VA_STATUS_SUCCESS) { EXPECT_INVALID_ID(config); + } } diff --git a/test/i965_test_environment.cpp b/test/i965_test_environment.cpp index ee8b1cc4..3065579d 100644 --- a/test/i965_test_environment.cpp +++ b/test/i965_test_environment.cpp @@ -82,8 +82,9 @@ void I965TestEnvironment::SetUp() void I965TestEnvironment::TearDown() { - if (m_vaDisplay) + if (m_vaDisplay) { EXPECT_STATUS(vaTerminate(m_vaDisplay)); + } if (m_handle >= 0) close(m_handle); diff --git a/test/i965_test_fixture.cpp b/test/i965_test_fixture.cpp index ac44ddfd..4588aa45 100644 --- a/test/i965_test_fixture.cpp +++ b/test/i965_test_fixture.cpp @@ -44,12 +44,13 @@ Surfaces I965TestFixture::createSurfaces(int w, int h, int format, size_t count, } else { VADriverContextP ctx(*this); EXPECT_PTR(ctx); - if (ctx) + if (ctx) { EXPECT_STATUS( ctx->vtable->vaCreateSurfaces2( *this, format, w, h, surfaces.data(), surfaces.size(), const_cast<VASurfaceAttrib*>(attributes.data()), attributes.size())); + } } for (size_t i(0); i < count; ++i) { |