about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compresult.c3
-rw-r--r--Src/Zle/computil.c40
-rw-r--r--Src/Zle/zle_main.c2
-rw-r--r--Src/Zle/zle_tricky.c6
-rw-r--r--Src/pattern.c2
5 files changed, 9 insertions, 44 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 9e66bab15..acb3b4845 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -135,8 +135,9 @@ cline_str(Cline l, int ins, int *csp)
 
     l = cut_cline(l);
 
-    pmm = smm = dm = 0;
+    pmm = smm = dm = pcs = scs = 0;
     pm = pmax = sm = smax = d = mid = cbr = -1;
+    brp = brs = NULL;
 
     /* Get the information about the brace beginning and end we have
      * to re-insert. */
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index bb69e5bf8..6254d9842 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -66,42 +66,6 @@ cdisp_calc(Cdisp disp, char **args)
     }
 }
 
-/* Build and return the array with the description-aligned strings. */
-
-static char **
-cdisp_build(Cdisp disp, char *sep, char **args)
-{
-    int sl = strlen(sep), pre = disp->pre, suf;
-    VARARR(char, buf, disp->pre + disp->suf + sl + 1);
-    char **ret, **rp, *cp, *copy, *cpp, oldc;
-
-    ret = (char **) zalloc((arrlen(args) + 1) * sizeof(char *));
-
-    memcpy(buf + pre, sep, sl);
-    suf = pre + sl;
-
-    for (rp = ret; *args; args++) {
-	copy = dupstring(*args);
-	for (cp = cpp = copy; *cp && *cp != ':'; cp++) {
-	    if (*cp == '\\' && cp[1])
-		cp++;
-	    *cpp++ = *cp;
-	}
-	oldc = *cpp;
-	*cpp = '\0';
-	if (((cpp == cp && oldc == ':') || *cp == ':') && cp[1]) {
-	    memset(buf, ' ', pre);
-	    memcpy(buf, copy, (cpp - copy));
-	    strcpy(buf + suf, cp + 1);
-	    *rp++ = ztrdup(buf);
-	} else
-	    *rp++ = ztrdup(copy);
-    }
-    *rp = NULL;
-
-    return ret;
-}
-
 /* Help fuer `_describe'. */
 
 typedef struct cdset *Cdset;
@@ -1600,8 +1564,8 @@ parse_cvdef(char *nam, char **args)
     Cvdef ret;
     Cvval val, *valp;
     Caarg arg;
-    char **oargs = args, sep, *name, *descr, *p, *q, **xor, c;
-    int xnum, multi, vtype, hassep;
+    char **oargs = args, sep = '\0', *name, *descr, *p, *q, **xor, c;
+    int xnum, multi, vtype, hassep = 0;
 
     if (args[0][0] == '-' && args[0][1] == 's' && !args[0][2]) {
 	if (args[1][0] && args[1][1]) {
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 420494a52..095a9d171 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -736,7 +736,7 @@ bin_vared(char *name, char **args, char *ops, int func)
     int create = 0;
     int type = PM_SCALAR, obreaks = breaks, haso = 0;
     char *p1 = NULL, *p2 = NULL;
-    FILE *oshout;
+    FILE *oshout = NULL;
 
     if (zleactive) {
 	zwarnnam(name, "ZLE cannot be used recursively (yet)", NULL, 0);
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 9d6c925b8..e617313a0 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1333,9 +1333,9 @@ get_comp_string(void)
 	    /* Try and deal with foo{xxx etc. */
 	    char *curs = s + (isset(COMPLETEINWORD) ? offs : strlen(s));
 	    char *predup = dupstring(s), *dp = predup;
-	    char *bbeg = NULL, *bend = NULL, *dbeg;
+	    char *bbeg = NULL, *bend = NULL, *dbeg = NULL;
 	    char *lastp = NULL, *firsts = NULL;
-	    int cant = 0, begi, boffs = offs, hascom = 0;
+	    int cant = 0, begi = 0, boffs = offs, hascom = 0;
 
 	    for (i = 0, p = s; *p; p++, dp++, i++) {
 		/* careful, ${... is not a brace expansion...
@@ -1898,7 +1898,7 @@ listlist(LinkList l)
 	totl += len;
     }
     if ((ncols = ((columns + 2) / longest))) {
-	int tlines, tline, tcols, maxlen, nth, width;
+	int tlines = 0, tline, tcols = 0, maxlen, nth, width;
 
 	nlines = (num + ncols - 1) / ncols;
 
diff --git a/Src/pattern.c b/Src/pattern.c
index 7d77a94da..27fcd0a7e 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -1294,7 +1294,7 @@ pattry(Patprog prog, char *string)
 mod_export int
 pattryrefs(Patprog prog, char *string, int *nump, int *begp, int *endp)
 {
-    int i, maxnpos;
+    int i, maxnpos = 0;
     char **sp, **ep;
     char *progstr = (char *)prog + prog->startoff;