* i387-tdep.c (print_i387_value): Cast &value to (char *) in
authorMark Kettenis <kettenis@gnu.org>
Sun, 21 May 2000 21:21:20 +0000 (21:21 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sun, 21 May 2000 21:21:20 +0000 (21:21 +0000)
pointer arithmetic.  Fixes a bug which manifested itself on
FreeBSD.

gdb/ChangeLog
gdb/i387-tdep.c

index 643164d..7f12774 100644 (file)
@@ -1,3 +1,9 @@
+2000-05-21  Mark Kettenis  <kettenis@gnu.org>
+
+       * i387-tdep.c (print_i387_value): Cast &value to (char *) in
+       pointer arithmetic.  Fixes a bug which manifested itself on
+       FreeBSD.
+
 2000-05-20  J.T. Conklin  <jtc@redback.com>
 
        * target.h (target_memory_bfd_section): Removed declaration.
index f887da9..f56b3d0 100644 (file)
@@ -176,7 +176,8 @@ print_i387_value (char *raw)
     {
       /* Copy straight over, but take care of the padding.  */
       memcpy (&value, raw, FPU_REG_RAW_SIZE);
-      memset (&value + FPU_REG_RAW_SIZE, 0, sizeof (value) - FPU_REG_RAW_SIZE);
+      memset ((char *) &value + FPU_REG_RAW_SIZE, 0,
+             sizeof (value) - FPU_REG_RAW_SIZE);
     }
   else
 #endif