From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22764 invoked from network); 11 Mar 1999 16:28:04 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Mar 1999 16:28:04 -0000 Received: (qmail 26220 invoked by alias); 11 Mar 1999 16:27:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5761 Received: (qmail 26212 invoked from network); 11 Mar 1999 16:27:34 -0000 Date: Thu, 11 Mar 1999 17:27:31 +0100 (MET) Message-Id: <199903111627.RAA01887@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Bart Schaefer's message of Thu, 11 Mar 1999 08:15:03 -0800 (PST) Subject: Re: More compiler warnings after recent patches Bart Schaefer wrote: > Thanks for the quick reply on the options.c thing ... here's more: > > ../../../zsh-3.1.5/Src/Zle/compctl.c: In function `parse_cmatcher': > ../../../zsh-3.1.5/Src/Zle/compctl.c:186: warning: `r' might be used uninitialized in this function > ... [ more of that...] In all cases the variables couldn't be used uninitialised. It was just that the compiler tried to be clever, and... Bye Sven diff -u os/Zle/compctl.c Src/Zle/compctl.c --- os/Zle/compctl.c Thu Mar 11 14:31:01 1999 +++ Src/Zle/compctl.c Thu Mar 11 17:26:07 1999 @@ -183,7 +183,7 @@ static Cmatcher parse_cmatcher(char *name, char *s) { - Cmatcher ret = NULL, r, n; + Cmatcher ret = NULL, r = NULL, n; Cpattern line, word, left, right; int fl, ll, wl, lal, ral, err; @@ -276,8 +276,10 @@ n->right = right; n->ralen = ral; - if (ret) r->next = n; - else ret = n; + if (ret) + r->next = n; + else + ret = n; r = n; } @@ -290,7 +292,7 @@ static Cpattern parse_pattern(char *name, char **sp, int *lp, char e, int *err) { - Cpattern ret = NULL, r, n; + Cpattern ret = NULL, r = NULL, n; unsigned char *s = (unsigned char *) *sp; int l = 0; @@ -1707,6 +1709,7 @@ } for (p = *argv + 1; *p; p++) { sp = NULL; + e = NULL; dm = 0; switch (*p) { case 'q': @@ -2229,7 +2232,7 @@ if (comp_check()) { char *s, **p; int i, l = arrlen(compwords), t = 0, b = 0, e = l - 1; - Comp c; + Comp c = NULL; i = compcurrent - 1; if (i < 0 || i >= l) -- Sven Wischnowsky wischnow@informatik.hu-berlin.de