1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-26 18:46:11 +02:00

transport: drop "int cmp = cmp" hack

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;
however, gcc versions 4.4.7 and 4.7.2 do not.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2013-03-21 07:13:33 -04:00 committed by Junio C Hamano
parent cbfd5e1cbb
commit c5d5c9a9a3

View File

@ -106,7 +106,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
return;
for (;;) {
int cmp = cmp, len;
int cmp, len;
if (!fgets(buffer, sizeof(buffer), f)) {
fclose(f);