Re: [PATCH] objects: scope count variable to loop

2017-07-24 Thread Jeff King
On Mon, Jul 24, 2017 at 10:12:59AM -0700, Stefan Beller wrote: > > Interestingly I have no problems compiling it here. I wonder if Stefan's > > config.mak is supplying -std=c89 or some other restrictive flag. Or if > > his compiler is a different version (though I tried with gcc-6, gcc-4.9, > > an

Re: [PATCH] objects: scope count variable to loop

2017-07-24 Thread Stefan Beller
On Mon, Jul 24, 2017 at 10:08 AM, Jeff King wrote: > On Wed, Jul 19, 2017 at 11:23:42AM -0700, Brandon Williams wrote: > >> > object.c: In function ‘object_array_remove_duplicates’: >> > object.c:404:2: error: ‘for’ loop initial declarations are only allowed in >> > C99 mode >> > for (unsigned

Re: [PATCH] objects: scope count variable to loop

2017-07-24 Thread Jeff King
On Wed, Jul 19, 2017 at 11:23:42AM -0700, Brandon Williams wrote: > > object.c: In function ‘object_array_remove_duplicates’: > > object.c:404:2: error: ‘for’ loop initial declarations are only allowed in > > C99 mode > > for (unsigned src = 0; src < nr; src++) { > > ^ > > object.c:404:2: not

Re: [PATCH] objects: scope count variable to loop

2017-07-19 Thread Brandon Williams
On 07/19, Stefan Beller wrote: > This is another test balloon to see if we get complaints from people > whose compilers do not support variables scoped to for loops. > > This part of the code base was chosen as it is very old code that does > not change often, such that a potential revert is easy.

[PATCH] objects: scope count variable to loop

2017-07-19 Thread Stefan Beller
This is another test balloon to see if we get complaints from people whose compilers do not support variables scoped to for loops. This part of the code base was chosen as it is very old code that does not change often, such that a potential revert is easy. Signed-off-by: Stefan Beller --- This