From: Junio C Hamano Date: Mon, 25 Mar 2013 19:51:50 +0000 (-0700) Subject: transport.c: help gcc 4.6.3 users by squelching compiler warning X-Git-Tag: v1.8.2.1~48 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/04fe1184fd0611bf26785b365dd344b8f7d72861?ds=inline 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 --- diff --git a/transport.c b/transport.c index 87b8f145ac..e6f9346c76 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);