zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: pws-21: uninitialized variables
@ 1999-06-11 20:35 Wayne Davison
  0 siblings, 0 replies; only message in thread
From: Wayne Davison @ 1999-06-11 20:35 UTC (permalink / raw)
  To: ZSH workers mailing list

It looks like the complaint about a variable in add_match_data()
being potentially used uninitialized is valid, so this patch sets
qisl to 0.

The complaints about 4 variables in sep_comp_string() being
potentially used uninitialized appear to be bogus, but I like to get
rid of warnings, so I added initializations for them as well.

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/Zle/zle_tricky.c
--- zsh-3.1.5-pws-21/Src/Zle/zle_tricky.c	Tue Jun  8 00:30:29 1999
+++ ./Src/Zle/zle_tricky.c	Tue Jun  8 18:25:39 1999
@@ -3427,7 +3427,7 @@
     Aminfo ai = (alt ? fainfo : ainfo);
     int palen, salen, qipl, ipl, pl, ppl, qisl, isl, psl;
 
-    palen = salen = qipl = ipl = pl = ppl = isl = psl = 0;
+    palen = salen = qipl = ipl = pl = ppl = qisl = isl = psl = 0;
 
     DPUTS(!line, "BUG: add_match_data() without cline");
 
@@ -4914,6 +4914,9 @@
     int sl = strlen(ss), tl, got = 0, i = 0, cur = -1, oll = ll;
     int ois = instring, oib = inbackt;
     char *tmp, *p, *ns, *ol = (char *) line, sav, oaq = autoq, *qp, *qs;
+
+    swb = swe = soffs = 0;
+    ns = NULL;
 
     /* Put the string in the lexer buffer and call the lexer to *
      * get the words we have to expand.                        */
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-06-11 20:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-11 20:35 PATCH: pws-21: uninitialized variables Wayne Davison

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).