[Piglit] [PATCH 1/3] arb_direct_state_access: Avoid void pointer arithmetic.
Martin Peres
martin.peres at linux.intel.com
Tue Mar 3 05:52:36 PST 2015
Sorry again for breaking the build on msvc! Maybe we could add
"-Wpointer-arith" to the build options to avoid this from happening in
the future.
Reviewed-by: Martin Peres <martin.peres at linux.intel.com>
On 03/03/15 15:46, Jose Fonseca wrote:
> It's not supported by MSVC.
> ---
> tests/spec/arb_direct_state_access/transformfeedback-bufferrange.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/spec/arb_direct_state_access/transformfeedback-bufferrange.c b/tests/spec/arb_direct_state_access/transformfeedback-bufferrange.c
> index b45441f..485bd18 100644
> --- a/tests/spec/arb_direct_state_access/transformfeedback-bufferrange.c
> +++ b/tests/spec/arb_direct_state_access/transformfeedback-bufferrange.c
> @@ -213,10 +213,10 @@ piglit_display(void)
>
> /* check the result */
> glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf[0]);
> - v = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, GL_READ_ONLY) + offset;
> + v = (GLfloat *)((GLbyte *)glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, GL_READ_ONLY) + offset);
> piglit_check_gl_error(GL_NO_ERROR);
> glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf[1]);
> - w = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, GL_READ_ONLY) + offset;
> + w = (GLfloat *)((GLbyte *)glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, GL_READ_ONLY) + offset);
> piglit_check_gl_error(GL_NO_ERROR);
>
> for (i = 0; i < num_prims; i++) {
More information about the Piglit
mailing list