[Beignet] [PATCH 3/5] Utest: Fix an unused waring in 2.0 utest

Xiuli Pan xiuli.pan at intel.com
Tue Jan 24 08:47:57 UTC 2017


From: Pan Xiuli <xiuli.pan at intel.com>

cpu_src has no use.

Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
 utests/compiler_program_global.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/utests/compiler_program_global.cpp b/utests/compiler_program_global.cpp
index ef7c655..a583c60 100644
--- a/utests/compiler_program_global.cpp
+++ b/utests/compiler_program_global.cpp
@@ -22,7 +22,6 @@ static int init_program(const char* name, cl_context ctx, cl_program *pg )
 void compiler_program_global()
 {
   const int n = 16;
-  int cpu_src[16];
   cl_int err;
 
   // Setup kernel and buffers
@@ -50,7 +49,7 @@ void compiler_program_global()
 
   OCL_MAP_BUFFER(0);
   for (int i = 0; i <  n; ++i)
-    cpu_src[i] = ((int*)buf_data[0])[i] = i;
+    ((int*)buf_data[0])[i] = i;
   OCL_UNMAP_BUFFER(0);
 
   // Run the kernel on GPU
-- 
2.7.4



More information about the Beignet mailing list