utests: fix one bug when create image at one test case.
authorZhigang Gong <zhigang.gong@intel.com>
Wed, 25 Jun 2014 05:53:14 +0000 (13:53 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 25 Jun 2014 05:53:14 +0000 (13:53 +0800)
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
utests/compiler_movforphi_undef.cpp

index 3c5a456..8f1e66e 100644 (file)
@@ -1,4 +1,5 @@
 #include "utest_helper.hpp"
+#include "string.h"
 
 static void compiler_movforphi_undef(void)
 {
@@ -17,6 +18,7 @@ static void compiler_movforphi_undef(void)
 
   format.image_channel_order = CL_RGBA;
   format.image_channel_data_type = CL_UNSIGNED_INT8;
+  memset(&desc, 0, sizeof(desc));
   desc.image_type = CL_MEM_OBJECT_IMAGE2D;
   desc.image_width = w;
   desc.image_height = h;