pathspec: remove unused variable from unsupported_magic
authorBrandon Williams <bmwill@google.com>
Wed, 4 Jan 2017 18:04:02 +0000 (10:04 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2017 02:04:17 +0000 (18:04 -0800)
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>
pathspec.c
index b8faa8f4653bfb04d4ec56969c1128ae0aee1262..b9a3819d65c24d4b67a9cabbb38dfc8002294ab5 100644 (file)
@@ -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