Skip to content

Commit c5d5c9a

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cbfd5e1 commit c5d5c9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
106106
return;
107107

108108
for (;;) {
109-
int cmp = cmp, len;
109+
int cmp, len;
110110

111111
if (!fgets(buffer, sizeof(buffer), f)) {
112112
fclose(f);

0 commit comments

Comments
 (0)