summaryrefslogtreecommitdiff
path: root/utests/utest_helper.cpp
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@intel.com>2013-08-19 14:23:56 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-08-19 15:52:09 +0800
commit17c028da39b35f979ffd8cd2ed10cc4b305a14ca (patch)
tree4f279f9a0297ad6852a6fd003c1c98d7a585b63f /utests/utest_helper.cpp
parenta268c3d4bcfa9c7b95c9f3b439aec13f138a79c2 (diff)
downloadbeignet-17c028da39b35f979ffd8cd2ed10cc4b305a14ca.tar.gz
fix warning when egl is not there
[ 32%] Building CXX object utests/CMakeFiles/utests.dir/utest_helper.cpp.o /home/q/beignet.git/utests/utest_helper.cpp: In function ‘int cl_ocl_init()’: /home/q/beignet.git/utests/utest_helper.cpp:314:8: warning: variable ‘hasGLExt’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/utest_helper.cpp')
-rw-r--r--utests/utest_helper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp
index 9069db21..297c6a33 100644
--- a/utests/utest_helper.cpp
+++ b/utests/utest_helper.cpp
@@ -343,8 +343,8 @@ cl_ocl_init(void)
}
}
-#ifdef HAS_EGL
if (hasGLExt) {
+#ifdef HAS_EGL
int i = 0;
props = new cl_context_properties[7];
props[i++] = CL_CONTEXT_PLATFORM;
@@ -356,8 +356,8 @@ cl_ocl_init(void)
props[i++] = (cl_context_properties)eglGetCurrentContext();
}
props[i++] = 0;
- }
#endif
+ }
/* Now create a context */
ctx = clCreateContext(props, 1, &device, NULL, NULL, &status);
if (status != CL_SUCCESS) {