提交 149a8134 编写于 作者: J Junio C Hamano

Merge branch 'jk/refs-c-squelch-gcc'

* jk/refs-c-squelch-gcc:
  silence gcc array-bounds warning
......@@ -3376,7 +3376,7 @@ char *shorten_unambiguous_ref(const char *refname, int strict)
size_t total_len = 0;
/* the rule list is NULL terminated, count them first */
for (; ref_rev_parse_rules[nr_rules]; nr_rules++)
for (nr_rules = 0; ref_rev_parse_rules[nr_rules]; nr_rules++)
/* no +1 because strlen("%s") < strlen("%.*s") */
total_len += strlen(ref_rev_parse_rules[nr_rules]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册