This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] ARI fix: avoid assignment in if clause in xcoffread.c


"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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]