From: Zhigang Gong Date: Fri, 28 Mar 2014 06:57:51 +0000 (+0800) Subject: Silent some compilation warnings. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4350a22d881858dfa308a6f5623e5a7211a58a28;p=contrib%2Fbeignet.git Silent some compilation warnings. Signed-off-by: Zhigang Gong Reviewed-by: "Yang, Rong R" Reviewed-by: "Song, Ruiling" --- diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp index a26aed7..aec0459 100644 --- a/backend/src/backend/gen_insn_selection.cpp +++ b/backend/src/backend/gen_insn_selection.cpp @@ -2939,7 +2939,6 @@ namespace gbe markAllChildren(dag); } - const uint32_t simdWidth = sel.ctx.getSimdWidth(); const Register pred = insn.getPredicate(); sel.push(); sel.curr.predicate = GEN_PREDICATE_NONE; diff --git a/src/cl_event.c b/src/cl_event.c index f838a3a..727ee1f 100644 --- a/src/cl_event.c +++ b/src/cl_event.c @@ -449,6 +449,7 @@ void cl_event_set_status(cl_event event, cl_int status) /* All user events complete, now wait enqueue events */ ret = cl_event_wait_events(enqueue_cb->num_events, enqueue_cb->wait_list, enqueue_cb->event->queue); + ret = ret; assert(ret != CL_ENQUEUE_EXECUTE_DEFER); cb = enqueue_cb; @@ -520,7 +521,6 @@ cl_int cl_event_get_timestamp(cl_event event, cl_profiling_info param_name) cl_gpgpu_event_get_exec_timestamp(event->gpgpu_event, 1, &ret_val); event->timestamp[param_name - CL_PROFILING_COMMAND_QUEUED] = ret_val; return CL_SUCCESS; - } else { - return CL_INVALID_VALUE; } + return CL_INVALID_VALUE; } diff --git a/src/cl_mem.h b/src/cl_mem.h index e325fa1..47a30dc 100644 --- a/src/cl_mem.h +++ b/src/cl_mem.h @@ -266,6 +266,8 @@ extern cl_mem cl_mem_new_libva_image(cl_context ctx, cl_image_format fmt, size_t row_pitch, cl_int *errcode); +extern cl_int cl_mem_get_fd(cl_mem mem, int* fd); + #endif /* __CL_MEM_H__ */ diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c index c2308da..2a2335b 100644 --- a/src/intel/intel_driver.c +++ b/src/intel/intel_driver.c @@ -643,11 +643,14 @@ static int32_t get_intel_tiling(cl_int tiling, uint32_t *intel_tiling) static int intel_buffer_set_tiling(cl_buffer bo, cl_image_tiling_t tiling, size_t stride) { - uint32_t intel_tiling, required_tiling; + uint32_t intel_tiling; int ret; if (UNLIKELY((get_intel_tiling(tiling, &intel_tiling)) < 0)) return -1; +#ifndef NDEBUG + uint32_t required_tiling; required_tiling = intel_tiling; +#endif ret = drm_intel_bo_set_tiling((drm_intel_bo*)bo, &intel_tiling, stride); assert(intel_tiling == required_tiling); return ret; diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp index 162c47b..a9e270e 100644 --- a/utests/utest_helper.cpp +++ b/utests/utest_helper.cpp @@ -531,6 +531,7 @@ int *cl_read_bmp(const char *filename, int *width, int *height) char magic[2]; int ret; ret = fread(&magic[0], 1, 2, fp); + ret = ret; assert(2 == ret); assert(magic[0] == 'B' && magic[1] == 'M');