From: Jeff King Date: Thu, 21 Mar 2013 11:13:33 +0000 (-0400) Subject: transport: drop "int cmp = cmp" hack X-Git-Tag: v1.8.2.1~53 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c5d5c9a9a3e31b7749e1f7ddfc8825b935eda1eb;p=git-core%2Fgit.git 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 Reviewed-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/transport.c b/transport.c index 886ffd8b1..87b8f145a 100644 --- a/transport.c +++ b/transport.c @@ -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);