summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2014-05-28 10:29:22 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-05-28 16:05:52 +0800
commitd274787b9afdc15b24bdcbb64048a78bf4a0f99d (patch)
treec2ffeceff07a2a48a04ecc729fc90706a925631c
parent68204669b80899944ced2c553282b5cdcc136ba9 (diff)
Silence some compilation warnings.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
-rw-r--r--src/cl_mem.c6
-rw-r--r--utests/compiler_local_slm.cpp3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/cl_mem.c b/src/cl_mem.c
index 87ea317b..9e7bfc92 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 48a072fa..3a0c1edc 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);
}