[Mesa-dev] [PATCH 5/9] i965: Move an 'i' declaration into its 'for' loop

Emil Velikov emil.l.velikov at gmail.com
Mon May 29 15:17:02 UTC 2017


On 29 May 2017 at 07:56, Martin Peres <martin.peres at free.fr> wrote:
> On 27/05/17 01:15, Chad Versace wrote:
>> In intel_update_dri2_buffers().
>> Trivial cleanup.
>> ---
>>  src/mesa/drivers/dri/i965/brw_context.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
>> index adae921e57..825912b7b5 100644
>> --- a/src/mesa/drivers/dri/i965/brw_context.c
>> +++ b/src/mesa/drivers/dri/i965/brw_context.c
>> @@ -1410,7 +1410,7 @@ intel_update_dri2_buffers(struct brw_context *brw, __DRIdrawable *drawable)
>>     struct gl_framebuffer *fb = drawable->driverPrivate;
>>     struct intel_renderbuffer *rb;
>>     __DRIbuffer *buffers = NULL;
>> -   int i, count;
>> +   int count;
>>     const char *region_name;
>>
>>     /* Set this up front, so that in case our buffers get invalidated
>> @@ -1426,7 +1426,7 @@ intel_update_dri2_buffers(struct brw_context *brw, __DRIdrawable *drawable)
>>     if (buffers == NULL)
>>        return;
>>
>> -   for (i = 0; i < count; i++) {
>> +   for (int i = 0; i < count; i++) {
>>         switch (buffers[i].attachment) {
>>         case __DRI_BUFFER_FRONT_LEFT:
>>             rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
>>
>
> Same comment as in patch 2, this requires C99. Do we compile mesa in c99
> nowadays?

Very short answer - yes. A slightly longer one is available in
configure.ac - look for MSVC2013_COMPAT_CFLAGS

-Emil


More information about the mesa-dev mailing list