Fix warnings in new EGL tests
authorPyry Haulos <phaulos@google.com>
Wed, 15 Mar 2017 17:06:30 +0000 (10:06 -0700)
committerPyry Haulos <phaulos@google.com>
Wed, 15 Mar 2017 17:06:30 +0000 (10:06 -0700)
Change-Id: I6d87c0bf5a61dcbb0f292dd7efa6fcb101b7442d

modules/egl/teglGetFrameTimestampsTests.cpp
modules/egl/teglRobustnessTests.cpp

index ac92763..87c90a9 100644 (file)
@@ -487,26 +487,26 @@ void GetFrameTimestampTest::executeForConfig (EGLDisplay display, EGLConfig conf
 
                for (size_t i = 0; i < requiredTimestampsCount; i++)
                {
-                       const bool supported = m_eglGetFrameTimestampSupportedANDROID(display, *surface, requiredTimestamps[i]);
+                       const bool supported = m_eglGetFrameTimestampSupportedANDROID(display, *surface, requiredTimestamps[i]) != EGL_FALSE;
                        EGLU_CHECK_MSG(egl, "eglGetFrameTimestampSupportedANDROID failed.");
                        TCU_CHECK_MSG(supported, "Required timestamp not supported.");
                }
 
                // Verify either retire or present is supported.
-               const bool retireSupported = m_eglGetFrameTimestampSupportedANDROID(display, *surface, EGL_DISPLAY_RETIRE_TIME_ANDROID);
+               const bool retireSupported = m_eglGetFrameTimestampSupportedANDROID(display, *surface, EGL_DISPLAY_RETIRE_TIME_ANDROID) != EGL_FALSE;
                EGLU_CHECK_MSG(egl, "eglGetFrameTimestampSupportedANDROID failed.");
-               const bool presentSupported = m_eglGetFrameTimestampSupportedANDROID(display, *surface, EGL_DISPLAY_PRESENT_TIME_ANDROID);
+               const bool presentSupported = m_eglGetFrameTimestampSupportedANDROID(display, *surface, EGL_DISPLAY_PRESENT_TIME_ANDROID) != EGL_FALSE;
                EGLU_CHECK_MSG(egl, "eglGetFrameTimestampSupportedANDROID failed.");
                TCU_CHECK_MSG(retireSupported != presentSupported, "DISPLAY_RETIRE or DISPLAY_PRESENT must be supported, but not both.");
 
                // Verify compositor timings are supported.
-               const bool deadlineSupported = m_eglGetCompositorTimingSupportedANDROID(display, *surface, EGL_COMPOSITE_DEADLINE_ANDROID);
+               const bool deadlineSupported = m_eglGetCompositorTimingSupportedANDROID(display, *surface, EGL_COMPOSITE_DEADLINE_ANDROID) != EGL_FALSE;
                EGLU_CHECK_MSG(egl, "eglGetCompositorTimingSupportedANDROID failed.");
                TCU_CHECK_MSG(deadlineSupported, "EGL_COMPOSITE_DEADLINE_ANDROID not supported.");
-               const bool intervalSupported = m_eglGetCompositorTimingSupportedANDROID(display, *surface, EGL_COMPOSITE_INTERVAL_ANDROID);
+               const bool intervalSupported = m_eglGetCompositorTimingSupportedANDROID(display, *surface, EGL_COMPOSITE_INTERVAL_ANDROID) != EGL_FALSE;
                EGLU_CHECK_MSG(egl, "eglGetCompositorTimingSupportedANDROID failed.");
                TCU_CHECK_MSG(intervalSupported, "EGL_COMPOSITE_INTERVAL_ANDROID not supported.");
-               const bool latencySupported = m_eglGetCompositorTimingSupportedANDROID(display, *surface, EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID);
+               const bool latencySupported = m_eglGetCompositorTimingSupportedANDROID(display, *surface, EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID) != EGL_FALSE;
                EGLU_CHECK_MSG(egl, "eglGetCompositorTimingSupportedANDROID failed.");
                TCU_CHECK_MSG(latencySupported, "EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID not supported.");
 
index 28f0ca8..7859c25 100644 (file)
@@ -2099,7 +2099,7 @@ public:
                        log << tcu::TestLog::Message << "Create context B" << tcu::TestLog::EndMessage;
                        RenderingContext contextB(m_eglTestCtx, attribList, m_eglConfig, m_eglDisplay, EGL_NO_CONTEXT);
                }
-               catch (const glu::Error& error)
+               catch (const glu::Error&)
                {
                        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Test failed! Could not create new context. glGetError() returned wrong value. Expected GL_NO_ERROR");
                        return STOP;