Code

transport.c: squelch a gcc 4.0.1 complaint about an uninitialized variable
authorBlake Ramsdell <blaker@gmail.com>
Fri, 2 Nov 2007 02:38:22 +0000 (19:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Nov 2007 09:05:18 +0000 (02:05 -0700)
The variable is always set if it is going to be used; gcc just does
not notice it.

Signed-off-by: Blake Ramsdell <blaker@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport.c

index 5132d289dac711c73e3eb7c249694ffa7ce8193e..d44fe7cee7bd8f0e524eff6b516cd2c8b8c919e2 100644 (file)
@@ -107,7 +107,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
                return;
 
        for (;;) {
-               int cmp, len;
+               int cmp = cmp, len;
 
                if (!fgets(buffer, sizeof(buffer), f)) {
                        fclose(f);