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>
This commit is contained in:

committed by
Junio C Hamano

parent
8aee769fa1
commit
93f3ddb2a1
@ -333,8 +333,8 @@ static void NORETURN unsupported_magic(const char *pattern,
|
|||||||
unsigned short_magic)
|
unsigned short_magic)
|
||||||
{
|
{
|
||||||
struct strbuf sb = STRBUF_INIT;
|
struct strbuf sb = STRBUF_INIT;
|
||||||
int i, n;
|
int i;
|
||||||
for (n = i = 0; i < ARRAY_SIZE(pathspec_magic); i++) {
|
for (i = 0; i < ARRAY_SIZE(pathspec_magic); i++) {
|
||||||
const struct pathspec_magic *m = pathspec_magic + i;
|
const struct pathspec_magic *m = pathspec_magic + i;
|
||||||
if (!(magic & m->bit))
|
if (!(magic & m->bit))
|
||||||
continue;
|
continue;
|
||||||
@ -344,7 +344,6 @@ static void NORETURN unsupported_magic(const char *pattern,
|
|||||||
strbuf_addf(&sb, "'%c'", m->mnemonic);
|
strbuf_addf(&sb, "'%c'", m->mnemonic);
|
||||||
else
|
else
|
||||||
strbuf_addf(&sb, "'%s'", m->name);
|
strbuf_addf(&sb, "'%s'", m->name);
|
||||||
n++;
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* We may want to substitute "this command" with a command
|
* We may want to substitute "this command" with a command
|
||||||
|
Reference in New Issue
Block a user