aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-03-25 12:51:50 -0700
committerJunio C Hamano <gitster@pobox.com>2013-03-25 12:51:50 -0700
commit04fe1184fd0611bf26785b365dd344b8f7d72861 (patch)
tree7e399fd56ff6d7620d947f3da5a4d7aa7ce07744 /transport.c
parentc9fc4415e2c7d7673cdad34d41114ede3435a395 (diff)
downloadgit-04fe1184fd0611bf26785b365dd344b8f7d72861.tar.gz
git-04fe1184fd0611bf26785b365dd344b8f7d72861.tar.xz
transport.c: help gcc 4.6.3 users by squelching compiler warning
To a human reader, it is quite obvious that cmp is assigned before it is used, but gcc 4.6.3 that ships with Ubuntu 12.04 is among those that do not get this right. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 87b8f145a..e6f9346c7 100644
--- a/transport.c
+++ b/transport.c
@@ -106,7 +106,8 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
return;
for (;;) {
- int cmp, len;
+ int cmp = 0; /* assigned before used */
+ int len;
if (!fgets(buffer, sizeof(buffer), f)) {
fclose(f);