summaryrefslogtreecommitdiff
path: root/pathspec.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-01-04 18:04:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-09 02:04:17 (GMT)
commit93f3ddb2a19264f59cda752d5c0ed81d96cdc6cc (patch)
tree281b20ed00ecfa67b93061084578db5f67350c28 /pathspec.c
parent8aee769fa12ff0d3a4100c3d0359bc33e49db672 (diff)
downloadgit-93f3ddb2a19264f59cda752d5c0ed81d96cdc6cc.zip
git-93f3ddb2a19264f59cda752d5c0ed81d96cdc6cc.tar.gz
git-93f3ddb2a19264f59cda752d5c0ed81d96cdc6cc.tar.bz2
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>
Diffstat (limited to 'pathspec.c')
-rw-r--r--pathspec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pathspec.c b/pathspec.c
index b8faa8f..b9a3819 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