From: Eli Zaretskii <eliz@gnu.org>
To: gdb-patches@sourceware.org
Subject: Re: [commit] Fix "show prompt"
Date: Sun, 29 May 2005 07:41:00 -0000 [thread overview]
Message-ID: <u3bs6a7bh.fsf@gnu.org> (raw)
In-Reply-To: <20050528182825.GD26806@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 28 May 2005 14:28:26 -0400)
> Date: Sat, 28 May 2005 14:28:26 -0400
> From: Daniel Jacobowitz <drow@false.org>
>
> One of the gcc4 warnings patches incorrectly converted the var_string
> case; it's a char **, not a char *.
True.
> switch (c->var_type)
> {
> case var_string:
> - if (((char *)c->var)[0] != '\0')
> - fputstr_filtered ((char *)c->var, '"', stb->stream);
> + if (*(char **) c->var)
Doesn't this work without a cast, like this:
if (*c->var != NULL)
? I think we should avoid unneeded type-casting.
next prev parent reply other threads:[~2005-05-29 6:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-28 18:40 Daniel Jacobowitz
2005-05-29 7:41 ` Eli Zaretskii [this message]
2005-05-29 15:07 ` Daniel Jacobowitz
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=u3bs6a7bh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox