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]

[commit] Avoid shadowing a function parameter in i387_supply_fxsave


2011-02-26  Michael Snyder  <msnyder@vmware.com>

	* i387-tdep.c (i387_supply_fxsave): Avoid shadowing a function
	param with a local variable of the same name.

Index: i387-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.c,v
retrieving revision 1.67
diff -u -p -u -p -r1.67 i387-tdep.c
--- i387-tdep.c	26 Feb 2011 23:45:01 -0000	1.67
+++ i387-tdep.c	26 Feb 2011 23:47:26 -0000
@@ -587,9 +587,9 @@ i387_supply_fxsave (struct regcache *reg
 
 		    if (val[0] & (1 << fpreg))
 		      {
-			int regnum = (fpreg + 8 - top) % 8 
-				       + I387_ST0_REGNUM (tdep);
-			tag = i387_tag (FXSAVE_ADDR (tdep, regs, regnum));
+			int thisreg = (fpreg + 8 - top) % 8 
+			               + I387_ST0_REGNUM (tdep);
+			tag = i387_tag (FXSAVE_ADDR (tdep, regs, thisreg));
 		      }
 		    else
 		      tag = 3;		/* Empty */

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