Skip to content

Commit 04fe118

Browse files
committed
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 <[email protected]>
1 parent c9fc441 commit 04fe118

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

transport.c

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

108108
for (;;) {
109-
int cmp, len;
109+
int cmp = 0; /* assigned before used */
110+
int len;
110111

111112
if (!fgets(buffer, sizeof(buffer), f)) {
112113
fclose(f);

0 commit comments

Comments
 (0)