From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22010 invoked from network); 18 Jul 1999 00:10:00 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jul 1999 00:10:00 -0000 Received: (qmail 14950 invoked by alias); 18 Jul 1999 00:09:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7180 Received: (qmail 14942 invoked from network); 18 Jul 1999 00:09:49 -0000 Date: Sat, 17 Jul 1999 17:09:47 -0700 (PDT) From: Wayne Davison To: Zsh Workers Subject: PATCH: 3.1.6-pre-1: remove variable warnings Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I tweaked the code to remove two warnings about potential uses of variables before they were defined. I'm not sure if the first one (for "cl" in complistmatches()) should be initialized to -1 or 0, so I chose -1. The initialization of "buf" (in getkeystring()) does not appear to be required (upon casual inspection), but doesn't hurt. ..wayne.. ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- Index: Src/Zle/complist.c @@ -309,7 +309,7 @@ Cexpl *e; int nlines = 0, ncols, nlist = 0, longest = 1, pnl = 0, opl = 0; int of = isset(LISTTYPES); - int mc, ml = 0, cc, hasm = 0, cl; + int mc, ml = 0, cc, hasm = 0, cl = -1; struct listcols col; if (minfo.asked == 2) { Index: Src/utils.c @@ -3202,7 +3202,7 @@ int meta = 0, control = 0; if (fromwhere == 6) - t = tmp; + t = buf = tmp; else if (fromwhere != 4) t = buf = zhalloc(strlen(s) + 1); else { ---8<------8<------8<------8<---cut here--->8------>8------>8------>8---