From: Junyan He <[email protected]>

Signed-off-by: Junyan He <[email protected]>
---
 utests/compiler_fill_image_3d.cpp   | 4 ++++
 utests/compiler_fill_image_3d_2.cpp | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/utests/compiler_fill_image_3d.cpp 
b/utests/compiler_fill_image_3d.cpp
index ac0b7e0..ec96e80 100644
--- a/utests/compiler_fill_image_3d.cpp
+++ b/utests/compiler_fill_image_3d.cpp
@@ -1,3 +1,4 @@
+#include <string.h>
 #include "utest_helper.hpp"
 
 static void compiler_fill_image_3d(void)
@@ -9,6 +10,9 @@ static void compiler_fill_image_3d(void)
   cl_image_format format;
   cl_image_desc desc;
 
+  memset(&desc, 0x0, sizeof(cl_image_desc));
+  memset(&format, 0x0, sizeof(cl_image_format));
+
   format.image_channel_order = CL_RGBA;
   format.image_channel_data_type = CL_UNSIGNED_INT8;
   desc.image_type = CL_MEM_OBJECT_IMAGE3D;
diff --git a/utests/compiler_fill_image_3d_2.cpp 
b/utests/compiler_fill_image_3d_2.cpp
index 4c56036..410ace8 100644
--- a/utests/compiler_fill_image_3d_2.cpp
+++ b/utests/compiler_fill_image_3d_2.cpp
@@ -1,3 +1,4 @@
+#include <string.h>
 #include "utest_helper.hpp"
 
 static void compiler_fill_image_3d_2(void)
@@ -8,6 +9,9 @@ static void compiler_fill_image_3d_2(void)
   cl_image_format format;
   cl_image_desc desc;
 
+  memset(&desc, 0x0, sizeof(cl_image_desc));
+  memset(&format, 0x0, sizeof(cl_image_format));
+
   format.image_channel_order = CL_RGBA;
   format.image_channel_data_type = CL_UNSIGNED_INT8;
   desc.image_type = CL_MEM_OBJECT_IMAGE3D;
-- 
1.8.3.2

_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to