From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21137 invoked from network); 11 Jun 1999 20:35:20 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Jun 1999 20:35:20 -0000 Received: (qmail 18519 invoked by alias); 11 Jun 1999 20:35:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6599 Received: (qmail 18512 invoked from network); 11 Jun 1999 20:35:10 -0000 Message-Id: <199906112035.NAA21517@bebop.clari.net> To: "ZSH workers mailing list" Subject: PATCH: pws-21: uninitialized variables Date: Fri, 11 Jun 1999 13:35:08 -0700 From: Wayne Davison 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---