Re: [PATCH 4/4] transport: drop "int cmp = cmp" hack

2013-03-25 Thread Junio C Hamano
Jeff King writes: > I wonder, though, what made you look at this. It did not come up in my > list of -Wuninitialized warnings. Did it get triggered by one of the > other gcc versions? No, but the function in question has that questionable construct written by somebody who does not understand lin

Re: [PATCH 4/4] transport: drop "int cmp = cmp" hack

2013-03-25 Thread Jeff King
On Mon, Mar 25, 2013 at 12:50:54PM -0700, Junio C Hamano wrote: > >> transport.c: In function 'get_refs_via_rsync': > >> transport.c:127:29: error: 'cmp' may be used uninitialized in this > >> function [-Werror=uninitialized] > >> transport.c:109:7: note: 'cmp' was declared here > >> > >> gcc (Ub

Re: [PATCH 4/4] transport: drop "int cmp = cmp" hack

2013-03-25 Thread Junio C Hamano
Jeff King writes: > On Sat, Mar 23, 2013 at 09:00:05PM -0700, Junio C Hamano wrote: > >> On Thu, Mar 21, 2013 at 4:13 AM, Jeff King wrote: >> > >> > According to 47ec794, this initialization is meant to >> > squelch an erroneous uninitialized variable warning from gcc >> > 4.0.1. That version i

Re: [PATCH 4/4] transport: drop "int cmp = cmp" hack

2013-03-24 Thread Torsten Bögershausen
On 24.03.13 10:32, Jeff King wrote: > On Sat, Mar 23, 2013 at 09:00:05PM -0700, Junio C Hamano wrote: > >> On Thu, Mar 21, 2013 at 4:13 AM, Jeff King wrote: >>> >>> According to 47ec794, this initialization is meant to >>> squelch an erroneous uninitialized variable warning from gcc >>> 4.0.1. T

Re: [PATCH 4/4] transport: drop "int cmp = cmp" hack

2013-03-24 Thread Jeff King
On Sat, Mar 23, 2013 at 09:00:05PM -0700, Junio C Hamano wrote: > On Thu, Mar 21, 2013 at 4:13 AM, Jeff King wrote: > > > > According to 47ec794, this initialization is meant to > > squelch an erroneous uninitialized variable warning from gcc > > 4.0.1. That version is quite old at this point, a

Re: [PATCH 4/4] transport: drop "int cmp = cmp" hack

2013-03-23 Thread Junio C Hamano
On Thu, Mar 21, 2013 at 4:13 AM, Jeff King wrote: > > According to 47ec794, this initialization is meant to > squelch an erroneous uninitialized variable warning from gcc > 4.0.1. That version is quite old at this point, and gcc 4.1 > and up handle it fine, with one exception. There seems to be >

Re: [PATCH 4/4] transport: drop "int cmp = cmp" hack

2013-03-21 Thread Jonathan Nieder
Jeff King wrote: > We probably _don't_ want to apply this one right now. I think we should. gcc 4.6.y warning bugs should be fixed --- there's no need for git to work around them. And anyone affected can easily stop using -Werror (-Werror is not meant for use by non-developers in production).