diff options
author | Vinson Lee <vlee@freedesktop.org> | 2014-12-02 20:14:30 -0800 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2014-12-03 22:37:40 -0800 |
commit | 358781d859bc43c969d66a0066b3baf355a738e2 (patch) | |
tree | 0cb7516c4d6169dfc20364e6361eb7609cc0ad1b /registry | |
parent | 5c1d198f58ada0c38de8805b6933839c1b5e02ee (diff) |
cl-api-compile-program: Initialize variable.
This patch silences Clang sometimes-uninitialized warnings.
compile-program.c:312:6: warning: variable 'kernel' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if(!piglit_cl_check_error(errNo, CL_SUCCESS)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compile-program.c:332:18: note: uninitialized use occurs here
clReleaseKernel(kernel);
^~~~~~
compile-program.c:312:3: note: remove the 'if' if its condition is always false
if(!piglit_cl_check_error(errNo, CL_SUCCESS)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compile-program.c:302:5: warning: variable 'kernel' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if(!piglit_cl_check_error(errNo, CL_SUCCESS)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compile-program.c:332:18: note: uninitialized use occurs here
clReleaseKernel(kernel);
^~~~~~
compile-program.c:302:2: note: remove the 'if' if its condition is always false
if(!piglit_cl_check_error(errNo, CL_SUCCESS)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compile-program.c:114:18: note: initialize the variable 'kernel' to silence this warning
cl_kernel kernel;
^
= NULL
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: EdB <edb+piglit@sigluy.net>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Diffstat (limited to 'registry')
0 files changed, 0 insertions, 0 deletions