From: Wayne Davison <wayned@users.sourceforge.net>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: PATCH: optimise string conversions in history etc.
Date: Sun, 4 May 2008 18:20:54 -0700 [thread overview]
Message-ID: <20080505012054.GB11804@blorf.net> (raw)
In-Reply-To: <7816.1208725908@pws-pc>
On Sun, Apr 20, 2008 at 10:11:48PM +0100, Peter Stephenson wrote:
> + ret = mbrtowc(&wc, bufptr, charlen, &mbs);
> + if (ret == 0) {
[...]
> + }
> + if (ret >= 0) {
Since ret is a size_t, "ret >= 0" is always true. I've checked in a fix
for that.
Note that I catch things like this due to having more compiler warnings
enabled (-W):
--- configure.ac 4 May 2008 18:43:01 -0000 1.100
+++ configure.ac 5 May 2008 01:06:21 -0000
@@ -385,13 +385,13 @@ dnl else use -O
if test -n "$auto_cflags" && test ."$ansi2knr" != .yes; then
if test "${enable_zsh_debug}" = yes; then
if test -n "$GCC"; then
- CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -ggdb"
+ CFLAGS="$CFLAGS -Wall -W -Wno-unused-parameter -ggdb"
else
CFLAGS="$CFLAGS -g"
fi
else
if test -n "$GCC"; then
- CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -O2"
+ CFLAGS="$CFLAGS -Wall -W -Wno-unused-parameter -O2"
else
CFLAGS="$CFLAGS -O"
fi
If we want to commit a change like that, we'd need to ensure that
-Wno-unused-parameter was accepted by the compiler (since it wasn't
in older gcc versions).
..wayne..
prev parent reply other threads:[~2008-05-05 1:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-20 21:11 Peter Stephenson
2008-05-05 1:20 ` Wayne Davison [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=20080505012054.GB11804@blorf.net \
--to=wayned@users.sourceforge.net \
--cc=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@sunsite.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).