From: Brandon Williams Date: Wed, 4 Jan 2017 18:04:02 +0000 (-0800) Subject: pathspec: remove unused variable from unsupported_magic X-Git-Tag: v2.12.0-rc0~66^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/93f3ddb2a19264f59cda752d5c0ed81d96cdc6cc pathspec: remove unused variable from unsupported_magic Removed unused variable 'n' from the 'unsupported_magic()' function. Signed-off-by: Brandon Williams Reviewed-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- diff --git a/pathspec.c b/pathspec.c index b8faa8f465..b9a3819d65 100644 --- a/pathspec.c +++ b/pathspec.c @@ -333,8 +333,8 @@ static void NORETURN unsupported_magic(const char *pattern, unsigned short_magic) { struct strbuf sb = STRBUF_INIT; - int i, n; - for (n = i = 0; i < ARRAY_SIZE(pathspec_magic); i++) { + int i; + for (i = 0; i < ARRAY_SIZE(pathspec_magic); i++) { const struct pathspec_magic *m = pathspec_magic + i; if (!(magic & m->bit)) continue; @@ -344,7 +344,6 @@ static void NORETURN unsupported_magic(const char *pattern, strbuf_addf(&sb, "'%c'", m->mnemonic); else strbuf_addf(&sb, "'%s'", m->name); - n++; } /* * We may want to substitute "this command" with a command