From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: More compiler warnings after recent patches
Date: Thu, 11 Mar 1999 17:27:31 +0100 (MET) [thread overview]
Message-ID: <199903111627.RAA01887@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Bart Schaefer's message of Thu, 11 Mar 1999 08:15:03 -0800 (PST)
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
reply other threads:[~1999-03-11 16:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199903111627.RAA01887@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).