summaryrefslogtreecommitdiff
path: root/utests/compiler_array1.cpp
diff options
context:
space:
mode:
authorLuo Xionghu <xionghu.luo@intel.com>2016-05-06 00:11:49 +0800
committerYang Rong <rong.r.yang@intel.com>2016-05-23 18:07:25 +0800
commite97a147d881e35f90a2958d42bce98dbde300559 (patch)
treeb12db48a0d81c75d9fdfff8a95a086b7196deb24 /utests/compiler_array1.cpp
parentddea2757ea3ff9b569e30fd6ce8c10b0bb06a623 (diff)
downloadbeignet-e97a147d881e35f90a2958d42bce98dbde300559.tar.gz
utest: init uninitialized local variables.
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/compiler_array1.cpp')
-rw-r--r--utests/compiler_array1.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utests/compiler_array1.cpp b/utests/compiler_array1.cpp
index fe1ecec3..70ff049b 100644
--- a/utests/compiler_array1.cpp
+++ b/utests/compiler_array1.cpp
@@ -3,7 +3,7 @@
static void cpu(int global_id, int *src, int *dst) {
int final[16];
for (int i = 0; i < 16; ++i) {
- int array[16];
+ int array[16] = {0};
for (int j = 0; j < src[0]; ++j)
array[j] = 1+src[0];
for (int j = src[0]; j < 16; ++j)