Skip to content
Browse files

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 <>
  • Loading branch information...
1 parent cbfd5e1 commit c5d5c9a9a3e31b7749e1f7ddfc8825b935eda1eb @peff peff committed with gitster Mar 21, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 transport.c
2 transport.c
@@ -106,7 +106,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
for (;;) {
- int cmp = cmp, len;
+ int cmp, len;
if (!fgets(buffer, sizeof(buffer), f)) {

0 comments on commit c5d5c9a

Please sign in to comment.
Something went wrong with that request. Please try again.