提交 c5d5c9a9 编写于 作者: J Jeff King 提交者: Junio C Hamano

transport: drop "int cmp = cmp" hack

According to 47ec7943, this initialization is meant to
squelch an erroneous uninitialized variable warning from gcc
4.0.1.  That version is quite old at this point, and gcc 4.1
and up handle it fine, with one exception. There seems to be
a regression in gcc 4.6.3, which produces the warning;
however, gcc versions 4.4.7 and 4.7.2 do not.
Signed-off-by: NJeff King <peff@peff.net>
Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 cbfd5e1c
...@@ -106,7 +106,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list) ...@@ -106,7 +106,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
return; return;
for (;;) { for (;;) {
int cmp = cmp, len; int cmp, len;
if (!fgets(buffer, sizeof(buffer), f)) { if (!fgets(buffer, sizeof(buffer), f)) {
fclose(f); fclose(f);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册