[Piglit] [PATCH 2/3] cl-program-tester: Avoid void pointer arithmetic.
Jose Fonseca
jfonseca at vmware.com
Tue Mar 3 05:46:18 PST 2015
Although CL tests are not built with MSVC, this is the single instance
of void pointer arithmetic in them, so updating it to not use void
pointer arithmetic will enable us to use -Werror=pointer-arith option
universally in a follow on change.
---
tests/cl/program/program-tester.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/cl/program/program-tester.c b/tests/cl/program/program-tester.c
index 3905679..314871a 100644
--- a/tests/cl/program/program-tester.c
+++ b/tests/cl/program/program-tester.c
@@ -188,7 +188,7 @@ add_dynamic_array(void** array,
free(old_array);
}
- memcpy((*array) + ((*count)*element_size), data, element_size);
+ memcpy((char *)(*array) + ((*count)*element_size), data, element_size);
(*count)++;
#undef GROW_SIZE
}
--
2.1.0
More information about the Piglit
mailing list