pathspec: remove unused variable from unsupported_magic

Removed unused variable 'n' from the 'unsupported_magic()' function. Signed-off-by: Brandon Williams <bmwill@google.com> Reviewed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Williams committed Jan 4, 2017 at 10:04 UTC 93f3ddb2a19264f59cda752d5c0ed81d96cdc6cc
1 file changed +2 -3
pathspec.c
+2 -3
@@ -333,8 +333,8 @@ static void NORETURN unsupported_magic(const char *pattern,
333 unsigned short_magic)
334 {
335 struct strbuf sb = STRBUF_INIT;
336 - int i, n;
337 - for (n = i = 0; i < ARRAY_SIZE(pathspec_magic); i++) {
336 + int i;
337 + for (i = 0; i < ARRAY_SIZE(pathspec_magic); i++) {
338 const struct pathspec_magic *m = pathspec_magic + i;
339 if (!(magic & m->bit))
340 continue;
@@ -344,7 +344,6 @@ static void NORETURN unsupported_magic(const char *pattern,
344 strbuf_addf(&sb, "'%c'", m->mnemonic);
345 else
346 strbuf_addf(&sb, "'%s'", m->name);
347 - n++;
347 }
348 /*
349 * We may want to substitute "this command" with a command