Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [commit] Fix "show prompt"
@ 2005-05-28 18:40 Daniel Jacobowitz
  2005-05-29  7:41 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-05-28 18:40 UTC (permalink / raw)
  To: gdb-patches

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:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-29 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-28 18:40 [commit] Fix "show prompt" Daniel Jacobowitz
2005-05-29  7:41 ` Eli Zaretskii
2005-05-29 15:07   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox