hardware/intel/common/vaapi
Revisión | f5369347a4b033e08c4e94d2e5433e7c5963a7e8 (tree) |
---|---|
Tiempo | 2017-07-28 10:59:25 |
Autor | Kelly Ledford <kelly.ledford@inte...> |
Commiter | Xiang, Haihao |
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>
@@ -58,6 +58,7 @@ TEST_P(I965ConfigTest, Create) | ||
58 | 58 | |
59 | 59 | EXPECT_STATUS_EQ(expect, actual); |
60 | 60 | |
61 | - if (actual != VA_STATUS_SUCCESS) | |
61 | + if (actual != VA_STATUS_SUCCESS) { | |
62 | 62 | EXPECT_INVALID_ID(config); |
63 | + } | |
63 | 64 | } |
@@ -82,8 +82,9 @@ void I965TestEnvironment::SetUp() | ||
82 | 82 | |
83 | 83 | void I965TestEnvironment::TearDown() |
84 | 84 | { |
85 | - if (m_vaDisplay) | |
85 | + if (m_vaDisplay) { | |
86 | 86 | EXPECT_STATUS(vaTerminate(m_vaDisplay)); |
87 | + } | |
87 | 88 | |
88 | 89 | if (m_handle >= 0) |
89 | 90 | close(m_handle); |
@@ -44,12 +44,13 @@ Surfaces I965TestFixture::createSurfaces(int w, int h, int format, size_t count, | ||
44 | 44 | } else { |
45 | 45 | VADriverContextP ctx(*this); |
46 | 46 | EXPECT_PTR(ctx); |
47 | - if (ctx) | |
47 | + if (ctx) { | |
48 | 48 | EXPECT_STATUS( |
49 | 49 | ctx->vtable->vaCreateSurfaces2( |
50 | 50 | *this, format, w, h, surfaces.data(), surfaces.size(), |
51 | 51 | const_cast<VASurfaceAttrib*>(attributes.data()), |
52 | 52 | attributes.size())); |
53 | + } | |
53 | 54 | } |
54 | 55 | |
55 | 56 | for (size_t i(0); i < count; ++i) { |