Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Add :^ syntax for zipping two arrays (v3)



On Aug 4,  6:51pm, Mikael Magnusson wrote:
} Subject: PATCH: Add :^ syntax for zipping two arrays (v3)
}
} This includes tests, updated docs to mention the "${a:^a}" thing, and
} fixes a crash discovered by adding tests. (When either of the arrays
} were empty, the :^^ form attempted to divide by 0).

Src/subst.c: In function `paramsubst':
Src/subst.c:2882: warning: unused variable `ap'
Src/subst.c:2882: warning: unused variable `apsrc'

diff --git a/Src/subst.c b/Src/subst.c
index fc1be7d..4a5fe3a 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2879,7 +2879,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags)
 	    break;
 	}
     } else if (inbrace && (*s == '^' || *s == Hat)) {
-	char **zip, **ap, **apsrc;
+	char **zip;
 	int shortest = 1;
 	++s;
 	if (*s == '^' || *s == Hat) {



Messages sorted by: Reverse Date, Date, Thread, Author