mirror of
https://github.com/git/git.git
synced 2026-04-12 01:40:10 +02:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user