Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: [commit] Fix "show prompt"
Date: Sat, 28 May 2005 18:40:00 -0000	[thread overview]
Message-ID: <20050528182825.GD26806@nevyn.them.org> (raw)

One of the gcc4 warnings patches incorrectly converted the var_string
case; it's a char **, not a char *.  Committed as obvious, fixes two
testcases on i686-pc-linux-gnu.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>

	* cli/cli-setshow.c (do_setshow_command): Partially revert previous
	change.  Cast to "char **" for var_string.

Index: cli/cli-setshow.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-setshow.c,v
retrieving revision 1.25
diff -u -p -r1.25 cli-setshow.c
--- cli/cli-setshow.c	26 May 2005 20:49:03 -0000	1.25
+++ cli/cli-setshow.c	28 May 2005 18:16:21 -0000
@@ -301,8 +301,8 @@ do_setshow_command (char *arg, int from_
       switch (c->var_type)
 	{
 	case var_string:
-	  if (((char *)c->var)[0] != '\0')
-	    fputstr_filtered ((char *)c->var, '"', stb->stream);
+	  if (*(char **) c->var)
+	    fputstr_filtered (*(char **) c->var, '"', stb->stream);
 	  break;
 	case var_string_noescape:
 	case var_optional_filename:


             reply	other threads:[~2005-05-28 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-28 18:40 Daniel Jacobowitz [this message]
2005-05-29  7:41 ` Eli Zaretskii
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=20050528182825.GD26806@nevyn.them.org \
    --to=drow@false.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