From: Zhigang Gong Date: Wed, 28 May 2014 02:29:22 +0000 (+0800) Subject: Silence some compilation warnings. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d274787b9afdc15b24bdcbb64048a78bf4a0f99d;p=contrib%2Fbeignet.git Silence some compilation warnings. Signed-off-by: Zhigang Gong Reviewed-by: Yang Rong --- diff --git a/src/cl_mem.c b/src/cl_mem.c index 87ea317..9e7bfc9 100644 --- a/src/cl_mem.c +++ b/src/cl_mem.c @@ -989,7 +989,7 @@ LOCAL cl_int cl_mem_kernel_copy_image(cl_command_queue queue, struct _cl_mem_image* src_image, struct _cl_mem_image* dst_image, const size_t *src_origin, const size_t *dst_origin, const size_t *region) { cl_int ret; - cl_kernel ker; + cl_kernel ker = NULL; size_t global_off[] = {0,0,0}; size_t global_sz[] = {1,1,1}; size_t local_sz[] = {LOCAL_SZ_0,LOCAL_SZ_1,LOCAL_SZ_2}; @@ -1090,7 +1090,7 @@ LOCAL cl_int cl_mem_copy_image_to_buffer(cl_command_queue queue, struct _cl_mem_image* image, cl_mem buffer, const size_t *src_origin, const size_t dst_offset, const size_t *region) { cl_int ret; - cl_kernel ker; + cl_kernel ker = NULL; size_t global_off[] = {0,0,0}; size_t global_sz[] = {1,1,1}; size_t local_sz[] = {LOCAL_SZ_0,LOCAL_SZ_1,LOCAL_SZ_2}; @@ -1164,7 +1164,7 @@ LOCAL cl_int cl_mem_copy_buffer_to_image(cl_command_queue queue, cl_mem buffer, struct _cl_mem_image* image, const size_t src_offset, const size_t *dst_origin, const size_t *region) { cl_int ret; - cl_kernel ker; + cl_kernel ker = NULL; size_t global_off[] = {0,0,0}; size_t global_sz[] = {1,1,1}; size_t local_sz[] = {LOCAL_SZ_0,LOCAL_SZ_1,LOCAL_SZ_2}; diff --git a/utests/compiler_local_slm.cpp b/utests/compiler_local_slm.cpp index 48a072f..3a0c1ed 100644 --- a/utests/compiler_local_slm.cpp +++ b/utests/compiler_local_slm.cpp @@ -11,8 +11,7 @@ void compiler_local_slm(void) OCL_NDRANGE(1); OCL_MAP_BUFFER(0); for (uint32_t i = 0; i < n; ++i) -// std::cout << ((int32_t*)buf_data[0])[i] << std::endl; - OCL_ASSERT(((int32_t*)buf_data[0])[i] == (i%16 + 2 + 1+ i/16)); + OCL_ASSERT(((uint32_t*)buf_data[0])[i] == (i%16 + 2 + 1+ i/16)); OCL_UNMAP_BUFFER(0); }