Skip to content

Commit

Permalink
transport: drop "int cmp = cmp" hack
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
peff authored and gitster committed Mar 21, 2013
1 parent cbfd5e1 commit c5d5c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transport.c
Expand Up @@ -106,7 +106,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
return; return;


for (;;) { for (;;) {
int cmp = cmp, len; int cmp, len;


if (!fgets(buffer, sizeof(buffer), f)) { if (!fgets(buffer, sizeof(buffer), f)) {
fclose(f); fclose(f);
Expand Down

0 comments on commit c5d5c9a

Please sign in to comment.