This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Fix "show prompt"
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Sat, 28 May 2005 14:28:26 -0400
- Subject: [commit] Fix "show prompt"
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: