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

2013-03-25 Thread Junio C Hamano
Jeff King p...@peff.net 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 p...@peff.net wrote: According to 47ec794, this initialization is meant to squelch an erroneous uninitialized variable warning from gcc 4.0.1.

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 (Ubuntu/Linaro

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

2013-03-25 Thread Junio C Hamano
Jeff King p...@peff.net 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

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 p...@peff.net wrote: According to 47ec794, this initialization is meant to squelch an erroneous uninitialized variable warning from gcc 4.0.1.

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 p...@peff.net 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

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

2013-03-21 Thread Jeff King
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 a regression in gcc 4.6.3, which produces the warning;

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).