[Piglit] [PATCH 1/3] arb_direct_state_access: Avoid void pointer arithmetic.
Jose Fonseca
jfonseca at vmware.com
Tue Mar 3 06:05:49 PST 2015
On 03/03/15 13:52, Martin Peres wrote:
> Sorry again for breaking the build on msvc!
No prob! Thanks for the quick review.
> Maybe we could add
> "-Wpointer-arith" to the build options to avoid this from happening in
> the future.
Definitely. This is done in patch 3/3. I know it's pretty hard to know
what's supported or not without compiler assistene. I really should have
done this long time ago.
>
> Reviewed-by: Martin Peres <martin.peres at linux.intel.com>
>
Jose
> 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