This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] ARI fix: avoid assignment in if clause in xcoffread.c
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: "'Pedro Alves'" <pedro at codesourcery dot com>, <gdb-patches at sourceware dot org>
- Date: Tue, 19 Apr 2011 16:33:29 +0200
- Subject: Re: [RFA] ARI fix: avoid assignment in if clause in xcoffread.c
- References: <000901cbfe97$9ed7f120$dc87d360$@muller@ics-cnrs.unistra.fr> <201104191501.53552.pedro@codesourcery.com> <36908.1941120841$1303222432@news.gmane.org>
"Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr> writes:
> + pp = (char *) strchr (name, ':');
The cast is useless, though, so I checked this in as obvious.
Andreas.
2011-04-19 Andreas Schwab <schwab@linux-m68k.org>
* xcoffread.c (process_xcoff_symbol): Remove useless cast.
(scan_xcoff_symtab): Likewise.
--- xcoffread.c.~1.86.~ 2011-04-19 16:25:37.000000000 +0200
+++ xcoffread.c 2011-04-19 16:26:41.000000000 +0200
@@ -1588,7 +1588,7 @@ process_xcoff_symbol (struct coff_symbol
if (*name == ':')
return NULL;
- pp = (char *) strchr (name, ':');
+ pp = strchr (name, ':');
if (pp == NULL)
return NULL;
@@ -2623,7 +2623,7 @@ scan_xcoff_symtab (struct objfile *objfi
swap_sym (&symbol, &main_aux[0], &namestring, &sraw_symbol,
&ssymnum, objfile);
- p = (char *) strchr (namestring, ':');
+ p = strchr (namestring, ':');
if (!p)
continue; /* Not a debugging symbol. */
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."