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] Remove redundant casts in i386-linux-nat.c


Now that regcache_raw_{collect|supply} have `void *' arguments again,
These casts are redundant.

This patch removes them.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* i386-linux-nat.c (fetch_register, store_register) 
	(supply_gregset, fill_gregset): Remove redundant casts.

Index: i386-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v
retrieving revision 1.65
diff -u -p -r1.65 i386-linux-nat.c
--- i386-linux-nat.c 9 Aug 2005 16:35:45 -0000 1.65
+++ i386-linux-nat.c 13 Aug 2005 22:00:19 -0000
@@ -1,6 +1,7 @@
 /* Native-dependent code for GNU/Linux i386.
 
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -183,7 +184,7 @@ fetch_register (int regno)
     error (_("Couldn't read register %s (#%d): %s."), REGISTER_NAME (regno),
 	   regno, safe_strerror (errno));
 
-  regcache_raw_supply (current_regcache, regno, (gdb_byte *) &val);
+  regcache_raw_supply (current_regcache, regno, &val);
 }
 
 /* Store one register. */
@@ -204,7 +205,7 @@ store_register (int regno)
     tid = PIDGET (inferior_ptid); /* Not a threaded program.  */
 
   errno = 0;
-  regcache_raw_collect (current_regcache, regno, (gdb_byte *) &val);
+  regcache_raw_collect (current_regcache, regno, &val);
   ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val);
   if (errno != 0)
     error (_("Couldn't write register %s (#%d): %s."), REGISTER_NAME (regno),
@@ -225,11 +226,11 @@ supply_gregset (elf_gregset_t *gregsetp)
   int i;
 
   for (i = 0; i < I386_NUM_GREGS; i++)
-    regcache_raw_supply (current_regcache, i, (gdb_byte *) (regp + regmap[i]));
+    regcache_raw_supply (current_regcache, i, regp + regmap[i]);
 
   if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
     regcache_raw_supply (current_regcache, I386_LINUX_ORIG_EAX_REGNUM,
-			 (gdb_byte *) (regp + ORIG_EAX));
+			 regp + ORIG_EAX);
 }
 
 /* Fill register REGNO (if it is a general-purpose register) in
@@ -244,12 +245,12 @@ fill_gregset (elf_gregset_t *gregsetp, i
 
   for (i = 0; i < I386_NUM_GREGS; i++)
     if (regno == -1 || regno == i)
-      regcache_raw_collect (current_regcache, i, (gdb_byte *) (regp + regmap[i]));
+      regcache_raw_collect (current_regcache, i, regp + regmap[i]);
 
   if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
       && I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
     regcache_raw_collect (current_regcache, I386_LINUX_ORIG_EAX_REGNUM,
-			  (gdb_byte *) (regp + ORIG_EAX));
+			  regp + ORIG_EAX);
 }
 
 #ifdef HAVE_PTRACE_GETREGS


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