summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang, Rong R <rong.r.yang@intel.com>2017-07-12 18:33:12 +0800
committerYang Rong <rong.r.yang@intel.com>2017-07-31 13:05:22 +0800
commit757ccf02d6eac0f0281f2feb08a8bf1be6c27dfe (patch)
treef263f9bcaf0f69999f4ff20f5f94415a675a7d5e
parent83bac267481dc4b524ded5f139bb55cfd7cfbd04 (diff)
Runtime: fix a build warning.
Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
-rw-r--r--src/cl_program.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cl_program.c b/src/cl_program.c
index 556b041f..3cb59068 100644
--- a/src/cl_program.c
+++ b/src/cl_program.c
@@ -371,6 +371,7 @@ cl_program_create_with_built_in_kernles(cl_context ctx,
cl_int * errcode_ret)
{
cl_int err = CL_SUCCESS;
+ cl_program built_in_prgs = NULL;
assert(ctx);
INVALID_DEVICE_IF (num_devices != 1);
@@ -382,11 +383,11 @@ cl_program_create_with_built_in_kernles(cl_context ctx,
extern size_t cl_internal_built_in_kernel_str_size;
char* p_built_in_kernel_str =cl_internal_built_in_kernel_str;
- cl_program built_in_prgs = cl_program_create_from_binary(ctx, 1,
- &ctx->devices[0],
- (size_t*)&cl_internal_built_in_kernel_str_size,
- (const unsigned char **)&p_built_in_kernel_str,
- &binary_status, &err);
+ built_in_prgs = cl_program_create_from_binary(ctx, 1,
+ &ctx->devices[0],
+ (size_t*)&cl_internal_built_in_kernel_str_size,
+ (const unsigned char **)&p_built_in_kernel_str,
+ &binary_status, &err);
if (!built_in_prgs)
return NULL;