From: Wayne Davison <wayne@clari.net>
To: Zsh Workers <zsh-workers@sunsite.auc.dk>
Subject: PATCH: 3.1.6-pre-1: remove variable warnings
Date: Sat, 17 Jul 1999 17:09:47 -0700 (PDT) [thread overview]
Message-ID: <Pine.GSO.4.10.9907171703350.29652-100000@house.clari.net> (raw)
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---
next reply other threads:[~1999-07-18 0:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-18 0:09 Wayne Davison [this message]
1999-07-19 6:34 Sven Wischnowsky
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=Pine.GSO.4.10.9907171703350.29652-100000@house.clari.net \
--to=wayne@clari.net \
--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).