zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Peter Stephenson <pws@ibmth.df.unipi.it>,
	zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: PATCH: 3.1.5-pws-4: compilation warnings
Date: Sun, 24 Jan 1999 10:02:04 -0800	[thread overview]
Message-ID: <990124100204.ZM6399@candle.brasslantern.com> (raw)
In-Reply-To: <9901201534.AA26168@ibmth.df.unipi.it>

On Jan 20,  4:34pm, Peter Stephenson wrote:
} Subject: PATCH: 3.1.5-pws-4: compilation warnings
}
} One of the dangling `else' branches in hist.c actually appeared to be
} a bug, with the logic not agreeing with the indentation.

After staring at this for some time to try to figure out the run-time
consequences of this bug, I've concluded that it's not a bug after all.
The only problem is that one close brace is at the wrong indentation
level and that the following "else if" has been improperly "cuddled"
up against that brace.  Here's the code structure now:

	if (!*buf)
	    if (c != '%') {
	    	...
	    } else {
		...
	} else if ((t0 = atoi(buf))) {
	    ...
	} ...

Shuffle whitespace around the second close brace:

	if (!*buf)
	    if (c != '%') {
	    	...
	    } else {
		...
	    }
	else if ((t0 = atoi(buf))) {
	    ...
	} ...

Now it's clear that the code is doing the right thing, even though it
was misleadingly structured.  The patch to 3.0.5 that I just posted is
not necessary after all (though still probably advisable for the sake
of readability).

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


      parent reply	other threads:[~1999-01-24 18:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-20 15:34 Peter Stephenson
1999-01-24 17:17 ` PATCH: 3.0.5: " Bart Schaefer
1999-01-24 18:02 ` Bart Schaefer [this message]

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=990124100204.ZM6399@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@math.gatech.edu \
    /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).