public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-ratmice-compile-Wc++-compat: Add explicit casts from void pointer.
@ 2010-09-15 12:45 ratmice
  0 siblings, 0 replies; 2+ messages in thread
From: ratmice @ 2010-09-15 12:45 UTC (permalink / raw)
  To: archer-commits

The branch, archer-ratmice-compile-Wc++-compat has been updated
       via  584e049d4ac847fe6af33741ece6597b3d7b0e14 (commit)
       via  529d09958c00553523cd3550d0eaa0fc1cf1e3f4 (commit)
       via  22a92541e1f828908756e8f1ec67c21477ac76e8 (commit)
      from  fcdc82f8a7ed37b03fb865db85c93507db639425 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 584e049d4ac847fe6af33741ece6597b3d7b0e14
Author: matt rice <ratmice@gmail.com>
Date:   Wed Sep 15 05:36:52 2010 -0700

    Add explicit casts from void pointer.

commit 529d09958c00553523cd3550d0eaa0fc1cf1e3f4
Author: matt rice <ratmice@gmail.com>
Date:   Wed Sep 15 05:27:38 2010 -0700

    ada-lang.[c,h] (grow_vect, GROW_VECT): Change type of grow_vect argument
    ada-typeprint.c: Remove FIXME.

commit 22a92541e1f828908756e8f1ec67c21477ac76e8
Author: matt rice <ratmice@gmail.com>
Date:   Wed Sep 15 05:19:26 2010 -0700

    *-tdep.c: Add explicit casts from void pointer.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ada-lang.c           |    7 +--
 gdb/ada-lang.h           |    4 +-
 gdb/ada-typeprint.c      |    2 -
 gdb/alpha-linux-tdep.c   |    4 +-
 gdb/alpha-mdebug-tdep.c  |    2 +-
 gdb/alpha-tdep.c         |   23 +++++-----
 gdb/alphanbsd-tdep.c     |    6 +-
 gdb/amd64obsd-tdep.c     |    4 +-
 gdb/arm-linux-tdep.c     |   11 +++--
 gdb/arm-symbian-tdep.c   |    2 +-
 gdb/arm-tdep.c           |   49 ++++++++++++----------
 gdb/armbsd-tdep.c        |    4 +-
 gdb/avr-tdep.c           |    6 +-
 gdb/bsd-uthread.c        |   18 +++++---
 gdb/cris-tdep.c          |   17 ++++----
 gdb/dicos-tdep.c         |    2 +-
 gdb/dsrec.c              |    2 +-
 gdb/frv-linux-tdep.c     |    6 +-
 gdb/frv-tdep.c           |    4 +-
 gdb/h8300-tdep.c         |   30 +++++++------
 gdb/hppa-hpux-tdep.c     |   16 ++++---
 gdb/hppa-linux-tdep.c    |    6 +-
 gdb/hppa-tdep.c          |   24 ++++++-----
 gdb/hppanbsd-tdep.c      |    2 +-
 gdb/hppaobsd-tdep.c      |    4 +-
 gdb/i386-cygwin-tdep.c   |    6 +-
 gdb/i386obsd-tdep.c      |    6 +-
 gdb/ia64-tdep.c          |   10 ++--
 gdb/iq2000-tdep.c        |    6 +-
 gdb/lm32-tdep.c          |    4 +-
 gdb/m32c-tdep.c          |   33 ++++++++-------
 gdb/m32r-linux-tdep.c    |    4 +-
 gdb/m32r-rom.c           |    2 +-
 gdb/m32r-tdep.c          |    7 ++-
 gdb/m68hc11-tdep.c       |   11 +++--
 gdb/m68k-tdep.c          |    6 +-
 gdb/m68kbsd-tdep.c       |    4 +-
 gdb/m68klinux-tdep.c     |    2 +-
 gdb/m88k-tdep.c          |   10 +++--
 gdb/mep-tdep.c           |   18 +++++---
 gdb/microblaze-tdep.c    |    2 +-
 gdb/mips-irix-tdep.c     |    2 +-
 gdb/mips-linux-tdep.c    |   12 +++--
 gdb/mips-tdep.c          |   26 +++++++-----
 gdb/mips64obsd-tdep.c    |    2 +-
 gdb/mipsnbsd-tdep.c      |    6 +-
 gdb/mn10300-linux-tdep.c |    7 ++-
 gdb/mn10300-tdep.c       |   12 +++--
 gdb/monitor.c            |    8 ++--
 gdb/moxie-tdep.c         |    7 ++-
 gdb/mt-tdep.c            |   12 +++---
 gdb/nto-tdep.c           |    6 +-
 gdb/ppc-linux-tdep.c     |   31 +++++++------
 gdb/ppcobsd-tdep.c       |    2 +-
 gdb/remote-m32r-sdi.c    |    2 +-
 gdb/rs6000-tdep.c        |  104 +++++++++++++++++++++++++---------------------
 gdb/s390-tdep.c          |   14 +++---
 gdb/score-tdep.c         |   12 +++--
 gdb/sh-tdep.c            |    7 ++-
 gdb/sh64-tdep.c          |    8 ++-
 gdb/solib-frv.c          |   19 +++++----
 gdb/solib-irix.c         |    4 +-
 gdb/solib-som.c          |    2 +-
 gdb/solib-spu.c          |   12 +++--
 gdb/solib-target.c       |   24 ++++++----
 gdb/sparc-sol2-tdep.c    |    2 +-
 gdb/sparc-tdep.c         |   12 +++---
 gdb/sparc64-sol2-tdep.c  |    2 +-
 gdb/sparc64-tdep.c       |   10 ++--
 gdb/sparc64fbsd-tdep.c   |    2 +-
 gdb/sparc64nbsd-tdep.c   |    2 +-
 gdb/sparc64obsd-tdep.c   |    6 +-
 gdb/sparcnbsd-tdep.c     |    2 +-
 gdb/sparcobsd-tdep.c     |    2 +-
 gdb/spu-multiarch.c      |    2 +-
 gdb/spu-tdep.c           |   33 ++++++++-------
 gdb/v850-tdep.c          |    2 +-
 gdb/vax-tdep.c           |    4 +-
 gdb/vaxobsd-tdep.c       |    4 +-
 gdb/windows-tdep.c       |    2 +-
 gdb/xcoffread.c          |   12 +++--
 gdb/xstormy16-tdep.c     |    4 +-
 gdb/xtensa-tdep.c        |   15 ++++---
 83 files changed, 459 insertions(+), 386 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index a9a8136..74291b4 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -417,17 +417,16 @@ ada_print_array_index (struct value *index_value, struct ui_file *stream,
    ELEMENT_SIZE, grow it to contain at least MIN_SIZE objects,
    updating *SIZE as necessary and returning the (new) array.  */
 
-void *
-grow_vect (void *vect, size_t *size, size_t min_size, int element_size)
+void
+grow_vect (gdb_byte **vect, size_t *size, size_t min_size, int element_size)
 {
   if (*size < min_size)
     {
       *size *= 2;
       if (*size < min_size)
         *size = min_size;
-      vect = xrealloc (vect, *size * element_size);
+      *vect = (gdb_byte *) xrealloc (*vect, *size * element_size);
     }
-  return vect;
 }
 
 /* True (non-zero) iff TARGET matches FIELD_NAME up to any trailing
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 8f97f64..f4b580b 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -143,9 +143,9 @@ struct ada_task_info
    least M objects, updating V and S as necessary. */
 
 #define GROW_VECT(v, s, m)                                              \
-   if ((s) < (m)) (v) = grow_vect (v, &(s), m, sizeof *(v));
+   if ((s) < (m)) grow_vect ((gdb_byte **) &(v), &(s), m, sizeof *(v));
 
-extern void *grow_vect (void *, size_t *, size_t, int);
+extern void grow_vect (gdb_byte **, size_t *, size_t, int);
 
 extern int ada_get_field_index (const struct type *type,
                                 const char *field_name,
diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c
index 9f6a589..0e49182 100644
--- a/gdb/ada-typeprint.c
+++ b/gdb/ada-typeprint.c
@@ -202,8 +202,6 @@ print_dynamic_range_bound (struct type *type, const char *name, int name_len,
   LONGEST B;
   int OK;
 
-  /* FIXME the GROW_VECT call here seems to cause implicit casts to void
-     not sure why its the only such call to GROW_VECT that appears to. */
   GROW_VECT (name_buf, name_buf_len, name_len + strlen (suffix) + 1);
   strncpy (name_buf, name, name_len);
   strcpy (name_buf + name_len, suffix);
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index 3c71f2f..ced4f73 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -138,7 +138,7 @@ alpha_linux_supply_gregset (const struct regset *regset,
 			    struct regcache *regcache,
 			    int regnum, const void *gregs, size_t len)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   int i;
   gdb_assert (len >= 32 * 8);
 
@@ -165,7 +165,7 @@ alpha_linux_supply_fpregset (const struct regset *regset,
 			     struct regcache *regcache,
 			     int regnum, const void *fpregs, size_t len)
 {
-  const gdb_byte *regs = fpregs;
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
   int i;
   gdb_assert (len >= 32 * 8);
 
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
index 369b161..1c522bb 100644
--- a/gdb/alpha-mdebug-tdep.c
+++ b/gdb/alpha-mdebug-tdep.c
@@ -197,7 +197,7 @@ alpha_mdebug_frame_unwind_cache (struct frame_info *this_frame,
   int ireg, returnreg;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct alpha_mdebug_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct alpha_mdebug_unwind_cache);
   *this_prologue_cache = info;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index b470470..80be4c6 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -187,7 +187,8 @@ static void
 alpha_lds (struct gdbarch *gdbarch, void *out, const void *in)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  ULONGEST mem     = extract_unsigned_integer (in, 4, byte_order);
+  ULONGEST mem     = extract_unsigned_integer ((const gdb_byte *) in,
+					       4, byte_order);
   ULONGEST frac    = (mem >>  0) & 0x7fffff;
   ULONGEST sign    = (mem >> 31) & 1;
   ULONGEST exp_msb = (mem >> 30) & 1;
@@ -207,7 +208,7 @@ alpha_lds (struct gdbarch *gdbarch, void *out, const void *in)
     }
 
   reg = (sign << 63) | (exp << 52) | (frac << 29);
-  store_unsigned_integer (out, 8, byte_order, reg);
+  store_unsigned_integer ((const gdb_byte *) out, 8, byte_order, reg);
 }
 
 /* Similarly, this represents exactly the conversion performed by
@@ -219,9 +220,9 @@ alpha_sts (struct gdbarch *gdbarch, void *out, const void *in)
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   ULONGEST reg, mem;
 
-  reg = extract_unsigned_integer (in, 8, byte_order);
+  reg = extract_unsigned_integer ((const gdb_byte *) in, 8, byte_order);
   mem = ((reg >> 32) & 0xc0000000) | ((reg >> 29) & 0x3fffffff);
-  store_unsigned_integer (out, 4, byte_order, mem);
+  store_unsigned_integer ((const gdb_byte *) out, 4, byte_order, mem);
 }
 
 /* The alpha needs a conversion between register and memory format if the
@@ -794,7 +795,7 @@ alpha_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
   struct gdbarch_tdep *tdep;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct alpha_sigtramp_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct alpha_sigtramp_unwind_cache);
   *this_prologue_cache = info;
@@ -1144,7 +1145,7 @@ alpha_heuristic_frame_unwind_cache (struct frame_info *this_frame,
   int frame_reg, frame_size, return_reg, reg;
 
   if (*this_prologue_cache)
-    return *this_prologue_cache;
+    return (struct alpha_heuristic_unwind_cache *) *this_prologue_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct alpha_heuristic_unwind_cache);
   *this_prologue_cache = info;
@@ -1401,7 +1402,7 @@ void
 alpha_supply_int_regs (struct regcache *regcache, int regno,
 		       const void *r0_r30, const void *pc, const void *unique)
 {
-  const gdb_byte *regs = r0_r30;
+  const gdb_byte *regs = (const gdb_byte *) r0_r30;
   int i;
 
   for (i = 0; i < 31; ++i)
@@ -1422,7 +1423,7 @@ void
 alpha_fill_int_regs (const struct regcache *regcache,
 		     int regno, void *r0_r30, void *pc, void *unique)
 {
-  gdb_byte *regs = r0_r30;
+  gdb_byte *regs = (gdb_byte *) r0_r30;
   int i;
 
   for (i = 0; i < 31; ++i)
@@ -1440,7 +1441,7 @@ void
 alpha_supply_fp_regs (struct regcache *regcache, int regno,
 		      const void *f0_f30, const void *fpcr)
 {
-  const gdb_byte *regs = f0_f30;
+  const gdb_byte *regs = (const gdb_byte *) f0_f30;
   int i;
 
   for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
@@ -1456,7 +1457,7 @@ void
 alpha_fill_fp_regs (const struct regcache *regcache,
 		    int regno, void *f0_f30, void *fpcr)
 {
-  gdb_byte *regs = f0_f30;
+  gdb_byte *regs = (gdb_byte *) f0_f30;
   int i;
 
   for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
@@ -1660,7 +1661,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   if (arches != NULL)
     return arches->gdbarch;
 
-  tdep = xmalloc (sizeof (struct gdbarch_tdep));
+  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Lowest text address.  This is used by heuristic_proc_start()
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index d0d85ac..837814b53 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -57,7 +57,7 @@ alphanbsd_supply_fpregset (const struct regset *regset,
 			   struct regcache *regcache,
 			   int regnum, const void *fpregs, size_t len)
 {
-  const gdb_byte *regs = fpregs;
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
   int i;
 
   gdb_assert (len >= ALPHANBSD_SIZEOF_FPREGS);
@@ -81,7 +81,7 @@ alphanbsd_supply_gregset (const struct regset *regset,
 			  struct regcache *regcache,
 			  int regnum, const void *gregs, size_t len)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   int i;
 
   gdb_assert (len >= ALPHANBSD_SIZEOF_GREGS);
@@ -105,7 +105,7 @@ alphanbsd_aout_supply_gregset (const struct regset *regset,
 			       struct regcache *regcache,
 			       int regnum, const void *gregs, size_t len)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   int i;
 
   /* Table to map a GDB register number to a trapframe register index.  */
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c
index 89eac13..f21d3d3 100644
--- a/gdb/amd64obsd-tdep.c
+++ b/gdb/amd64obsd-tdep.c
@@ -110,7 +110,7 @@ amd64obsd_sigtramp_p (struct frame_info *this_frame)
     return 0;
 
   /* If we can't read the instructions at START_PC, return zero.  */
-  buf = alloca ((sizeof sigreturn) + 1);
+  buf = (gdb_byte *) alloca ((sizeof sigreturn) + 1);
   if (!safe_frame_unwind_memory (this_frame, start_pc + 6, buf, buflen))
     return 0;
 
@@ -356,7 +356,7 @@ amd64obsd_trapframe_cache (struct frame_info *this_frame, void **this_cache)
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct trad_frame_cache *) *this_cache;
 
   cache = trad_frame_cache_zalloc (this_frame);
   *this_cache = cache;
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 15fc1c9..dfe0faf 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -428,7 +428,7 @@ arm_linux_supply_gregset (const struct regset *regset,
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  const gdb_byte *gregs = gregs_buf;
+  const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
   int regno;
   CORE_ADDR reg_pc;
   gdb_byte pc_buf[INT_REGISTER_SIZE];
@@ -464,7 +464,7 @@ arm_linux_collect_gregset (const struct regset *regset,
 			   const struct regcache *regcache,
 			   int regnum, void *gregs_buf, size_t len)
 {
-  gdb_byte *gregs = gregs_buf;
+  gdb_byte *gregs = (const gdb_byte *) gregs_buf;
   int regno;
 
   for (regno = ARM_A1_REGNUM; regno < ARM_PC_REGNUM; regno++)
@@ -571,7 +571,7 @@ arm_linux_supply_nwfpe (const struct regset *regset,
 			struct regcache *regcache,
 			int regnum, const void *regs_buf, size_t len)
 {
-  const gdb_byte *regs = regs_buf;
+  const gdb_byte *regs = (const gdb_byte *) regs_buf;
   int regno;
 
   if (regnum == ARM_FPS_REGNUM || regnum == -1)
@@ -588,7 +588,7 @@ arm_linux_collect_nwfpe (const struct regset *regset,
 			 const struct regcache *regcache,
 			 int regnum, void *regs_buf, size_t len)
 {
-  gdb_byte *regs = regs_buf;
+  gdb_byte *regs = (gdb_byte *) regs_buf;
   int regno;
 
   for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++)
@@ -823,7 +823,8 @@ arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
 				    struct regcache *regs)
 {
   struct displaced_step_closure *dsc
-    = xmalloc (sizeof (struct displaced_step_closure));
+    = (struct displaced_step_closure *)
+    xmalloc (sizeof (struct displaced_step_closure));
 
   /* Detect when we enter an (inaccessible by GDB) Linux kernel helper, and
      stop at the return location.  */
diff --git a/gdb/arm-symbian-tdep.c b/gdb/arm-symbian-tdep.c
index 8e06852..fc3c91a 100644
--- a/gdb/arm-symbian-tdep.c
+++ b/gdb/arm-symbian-tdep.c
@@ -109,7 +109,7 @@ arm_symbian_osabi_sniffer (bfd *abfd)
   if (phdrs_size == -1)
     return GDB_OSABI_UNKNOWN;
 
-  phdrs = alloca (phdrs_size);
+  phdrs = (Elf_Internal_Phdr *) alloca (phdrs_size);
   num_phdrs = bfd_get_elf_phdrs (abfd, phdrs);
   if (num_phdrs == -1)
     return GDB_OSABI_UNKNOWN;
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 31f17f1..43b6ef3 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -299,7 +299,8 @@ arm_find_mapping_symbol (CORE_ADDR memaddr, CORE_ADDR *start)
 					    0 };
       unsigned int idx;
 
-      data = objfile_data (sec->objfile, arm_objfile_data_key);
+      data = (struct arm_per_objfile *) objfile_data (sec->objfile,
+						      arm_objfile_data_key);
       if (data != NULL)
 	{
 	  map = data->section_maps[sec->the_bfd_section->index];
@@ -1448,7 +1449,7 @@ arm_prologue_this_id (struct frame_info *this_frame,
 
   if (*this_cache == NULL)
     *this_cache = arm_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   /* This is meant to halt the backtrace at "_start".  */
   pc = get_frame_pc (this_frame);
@@ -1474,7 +1475,7 @@ arm_prologue_prev_register (struct frame_info *this_frame,
 
   if (*this_cache == NULL)
     *this_cache = arm_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   /* If we are asked to unwind the PC, then we need to return the LR
      instead.  The prologue may save PC, but it will point into this
@@ -1553,7 +1554,7 @@ arm_stub_this_id (struct frame_info *this_frame,
 
   if (*this_cache == NULL)
     *this_cache = arm_make_stub_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   *this_id = frame_id_build (cache->prev_sp, get_frame_pc (this_frame));
 }
@@ -1591,7 +1592,7 @@ arm_normal_frame_base (struct frame_info *this_frame, void **this_cache)
 
   if (*this_cache == NULL)
     *this_cache = arm_make_prologue_cache (this_frame);
-  cache = *this_cache;
+  cache = (struct arm_prologue_cache *) *this_cache;
 
   return cache->prev_sp - cache->framesize;
 }
@@ -1700,7 +1701,7 @@ static struct stack_item *
 push_stack_item (struct stack_item *prev, const void *contents, int len)
 {
   struct stack_item *si;
-  si = xmalloc (sizeof (struct stack_item));
+  si = (struct stack_item *) xmalloc (sizeof (struct stack_item));
   si->data = xmalloc (len);
   si->len = len;
   si->prev = prev;
@@ -2149,7 +2150,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
 	  CORE_ADDR regval = extract_unsigned_integer (val, len, byte_order);
 	  if (arm_pc_is_thumb (regval))
 	    {
-	      bfd_byte *copy = alloca (len);
+	      bfd_byte *copy = (bfd_byte *) alloca (len);
 	      store_unsigned_integer (copy, len, byte_order,
 				      MAKE_THUMB_ADDR (regval));
 	      val = copy;
@@ -2202,7 +2203,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
   while (si)
     {
       sp -= si->len;
-      write_memory (sp, si->data, si->len);
+      write_memory (sp, (const gdb_byte *) si->data, si->len);
       si = pop_stack_item (si);
     }
 
@@ -3313,7 +3314,7 @@ extend_buffer_earlier (gdb_byte *buf, CORE_ADDR endaddr,
   gdb_byte *new_buf, *middle;
   int bytes_to_read = new_len - old_len;
 
-  new_buf = xmalloc (new_len);
+  new_buf = (gdb_byte *) xmalloc (new_len);
   memcpy (new_buf + bytes_to_read, buf, old_len);
   xfree (buf);
   if (target_read_memory (endaddr - new_len, new_buf, bytes_to_read) != 0)
@@ -3379,7 +3380,7 @@ arm_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
     /* No room for an IT instruction.  */
     return bpaddr;
 
-  buf = xmalloc (buf_len);
+  buf = (gdb_byte *) xmalloc (buf_len);
   if (target_read_memory (bpaddr - buf_len, buf, buf_len) != 0)
     return bpaddr;
   any = 0;
@@ -5308,7 +5309,8 @@ arm_displaced_step_copy_insn (struct gdbarch *gdbarch,
 			      struct regcache *regs)
 {
   struct displaced_step_closure *dsc
-    = xmalloc (sizeof (struct displaced_step_closure));
+    = (struct displaced_step_closure *)
+    xmalloc (sizeof (struct displaced_step_closure));
   enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
   uint32_t insn = read_memory_unsigned_integer (from, 4, byte_order_for_code);
 
@@ -5914,7 +5916,7 @@ arm_skip_stub (struct frame_info *frame, CORE_ADDR pc)
       else
 	target_len -= strlen ("_from_arm");
 
-      target_name = alloca (target_len + 1);
+      target_name = (char *) alloca (target_len + 1);
       memcpy (target_name, name + 2, target_len);
       target_name[target_len] = '\0';
 
@@ -6160,7 +6162,7 @@ arm_coff_make_msymbol_special(int val, struct minimal_symbol *msym)
 static void
 arm_objfile_data_free (struct objfile *objfile, void *arg)
 {
-  struct arm_per_objfile *data = arg;
+  struct arm_per_objfile *data = (struct arm_per_objfile *) arg;
   unsigned int i;
 
   for (i = 0; i < objfile->obfd->section_count; i++)
@@ -6180,15 +6182,18 @@ arm_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile,
   if (name[1] != 'a' && name[1] != 't' && name[1] != 'd')
     return;
 
-  data = objfile_data (objfile, arm_objfile_data_key);
+  data = (struct arm_per_objfile *) objfile_data (objfile,
+						  arm_objfile_data_key);
   if (data == NULL)
     {
-      data = OBSTACK_ZALLOC (&objfile->objfile_obstack,
-			     struct arm_per_objfile);
+      data
+	= (struct arm_per_objfile *) OBSTACK_ZALLOC (&objfile->objfile_obstack,
+						     struct arm_per_objfile);
       set_objfile_data (objfile, arm_objfile_data_key, data);
-      data->section_maps = OBSTACK_CALLOC (&objfile->objfile_obstack,
-					   objfile->obfd->section_count,
-					   VEC(arm_mapping_symbol_s) *);
+      data->section_maps = (VEC(arm_mapping_symbol_s ) **)
+	OBSTACK_CALLOC (&objfile->objfile_obstack,
+			objfile->obfd->section_count,
+			VEC(arm_mapping_symbol_s) *);
     }
   map_p = &data->section_maps[bfd_get_section (sym)->index];
 
@@ -6371,7 +6376,7 @@ arm_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
 static struct value *
 value_of_arm_user_reg (struct frame_info *frame, const void *baton)
 {
-  const int *reg_p = baton;
+  const int *reg_p = (const int *) baton;
   return value_of_register (*reg_p, frame);
 }
 \f
@@ -6728,7 +6733,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       return best_arch->gdbarch;
     }
 
-  tdep = xcalloc (1, sizeof (struct gdbarch_tdep));
+  tdep = (struct gdbarch_tdep *) xcalloc (1, sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Record additional information about the architecture we are defining.
@@ -6981,7 +6986,7 @@ _initialize_arm_tdep (void)
   /* Initialize the array that will be passed to
      add_setshow_enum_cmd().  */
   valid_disassembly_styles
-    = xmalloc ((num_disassembly_options + 1) * sizeof (char *));
+    = (const char **) xmalloc ((num_disassembly_options + 1) * sizeof (char *));
   for (i = 0; i < num_disassembly_options; i++)
     {
       numregs = get_arm_regnames (i, &setname, &setdesc, &regnames);
diff --git a/gdb/armbsd-tdep.c b/gdb/armbsd-tdep.c
index 5eea328..fe1e690 100644
--- a/gdb/armbsd-tdep.c
+++ b/gdb/armbsd-tdep.c
@@ -53,7 +53,7 @@ armbsd_supply_fpregset (const struct regset *regset,
 			struct regcache *regcache,
 			int regnum, const void *fpregs, size_t len)
 {
-  const gdb_byte *regs = fpregs;
+  const gdb_byte *regs = (const gdb_byte *) fpregs;
   int i;
 
   gdb_assert (len >= ARMBSD_SIZEOF_FPREGS);
@@ -74,7 +74,7 @@ armbsd_supply_gregset (const struct regset *regset,
 		       struct regcache *regcache,
 		       int regnum, const void *gregs, size_t len)
 {
-  const gdb_byte *regs = gregs;
+  const gdb_byte *regs = (const gdb_byte *) gregs;
   int i;
 
   gdb_assert (len >= ARMBSD_SIZEOF_GREGS);


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [SCM]  archer-ratmice-compile-Wc++-compat: Add explicit casts from void pointer.
@ 2010-06-12 20:13 ratmice
  0 siblings, 0 replies; 2+ messages in thread
From: ratmice @ 2010-06-12 20:13 UTC (permalink / raw)
  To: archer-commits

The branch, archer-ratmice-compile-Wc++-compat has been updated
       via  1413af1d4e9706283bb420941af11d59f556ff51 (commit)
       via  633e804924035e3b0dd6a91934e835fd008e0597 (commit)
       via  93969420653c0165e421ff1a66d0b4db428c202b (commit)
       via  ca91cb52e21d642ffb7e550042f795025823f129 (commit)
       via  58bf1893873f1d72ba29cd7c335b18e06f7253de (commit)
       via  510a3bde29b83313192b47cf41ee754ebb5d98bf (commit)
       via  24aedd47b7f566f5473de24554662968452a64a1 (commit)
       via  4c3458577b95fd886ea854ae433f727fc0682b51 (commit)
       via  f55df0bc9b820ccac648f0476176f4719a5d70c0 (commit)
      from  c07138c3ee91455f517eeb86478eb46c4c6f3b1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 1413af1d4e9706283bb420941af11d59f556ff51
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 13:09:48 2010 -0700

    Add explicit casts from void pointer.

commit 633e804924035e3b0dd6a91934e835fd008e0597
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 13:09:33 2010 -0700

    Add explicit casts from void pointer.

commit 93969420653c0165e421ff1a66d0b4db428c202b
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 13:06:39 2010 -0700

    Add explicit casts from void pointer.

commit ca91cb52e21d642ffb7e550042f795025823f129
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 13:03:50 2010 -0700

    Add explicit casts from void pointer.

commit 58bf1893873f1d72ba29cd7c335b18e06f7253de
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 12:53:20 2010 -0700

    c*.c: Add explicit casts from void pointer.

commit 510a3bde29b83313192b47cf41ee754ebb5d98bf
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 12:50:30 2010 -0700

    target*.c: Add explicit casts from void pointer.

commit 24aedd47b7f566f5473de24554662968452a64a1
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 12:49:48 2010 -0700

    xml-*.c: Add explicit casts from void pointer.

commit 4c3458577b95fd886ea854ae433f727fc0682b51
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 12:48:30 2010 -0700

    dwarf2*.c: Add explicit casts from void pointer.

commit f55df0bc9b820ccac648f0476176f4719a5d70c0
Author: matt rice <ratmice@gmail.com>
Date:   Sat Jun 12 12:45:55 2010 -0700

    gdbserver/: Add explicit casts from void pointer.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ada-lang.c                |   27 +++---
 gdb/arch-utils.c              |    4 +-
 gdb/bcache.c                  |    3 +-
 gdb/buildsym.c                |    2 +-
 gdb/c-lang.c                  |    6 +-
 gdb/cli-out.c                 |   38 ++++----
 gdb/coff-pe-read.c            |    7 +-
 gdb/completer.c               |    7 +-
 gdb/corefile.c                |    6 +-
 gdb/cp-namespace.c            |   28 +++---
 gdb/cp-support.c              |   10 +-
 gdb/cp-valprint.c             |    2 +-
 gdb/d-lang.c                  |    2 +-
 gdb/dbxread.c                 |   12 +-
 gdb/demangle.c                |    2 +-
 gdb/dictionary.c              |   37 ++++---
 gdb/doublest.c                |    2 +-
 gdb/dwarf2-frame.c            |   51 ++++++----
 gdb/dwarf2expr.c              |   26 +++--
 gdb/dwarf2loc.c               |   39 ++++---
 gdb/dwarf2read.c              |  232 ++++++++++++++++++++++++----------------
 gdb/event-loop.c              |    9 +-
 gdb/event-top.c               |    5 +-
 gdb/exec.c                    |    6 +-
 gdb/expprint.c                |    4 +-
 gdb/f-lang.c                  |    2 +-
 gdb/findcmd.c                 |    4 +-
 gdb/frame-base.c              |   12 ++-
 gdb/frame-unwind.c            |   18 ++-
 gdb/frame.c                   |    6 +-
 gdb/gcore.c                   |    8 +-
 gdb/gdbarch.c                 |    4 +-
 gdb/gdbserver/event-loop.c    |    8 +-
 gdb/gdbserver/hostio.c        |    6 +-
 gdb/gdbserver/inferiors.c     |   18 ++--
 gdb/gdbserver/linux-low.c     |   41 ++++----
 gdb/gdbserver/linux-x86-low.c |    6 +-
 gdb/gdbserver/mem-break.c     |    8 +-
 gdb/gdbserver/proc-service.c  |    5 +-
 gdb/gdbserver/regcache.c      |    4 +-
 gdb/gdbserver/remote-utils.c  |   18 ++--
 gdb/gdbserver/server.c        |   47 +++++----
 gdb/gdbserver/target.c        |    2 +-
 gdb/gdbserver/thread-db.c     |   63 +++++++++---
 gdb/gdbserver/tracepoint.c    |   82 ++++++++-------
 gdb/gdbtypes.c                |   52 ++++++----
 gdb/gnu-v3-abi.c              |   12 ++-
 gdb/infcall.c                 |    3 +-
 gdb/infcmd.c                  |   19 ++--
 gdb/inferior.c                |    7 +-
 gdb/inflow.c                  |    6 +-
 gdb/infrun.c                  |   23 ++--
 gdb/inline-frame.c            |    2 +-
 gdb/jit.c                     |    9 +-
 gdb/jv-lang.c                 |   11 +-
 gdb/jv-typeprint.c            |    2 +-
 gdb/jv-valprint.c             |    3 +-
 gdb/language.c                |   20 ++--
 gdb/linespec.c                |   12 ++-
 gdb/m2-lang.c                 |    2 +-
 gdb/macroexp.c                |   10 +-
 gdb/macrotab.c                |   17 ++--
 gdb/main.c                    |   12 ++-
 gdb/mdebugread.c              |   20 ++--
 gdb/memattr.c                 |    4 +-
 gdb/memory-map.c              |   22 +++--
 gdb/mipsread.c                |    8 +-
 gdb/objc-lang.c               |   14 ++--
 gdb/objfiles.c                |   23 +++--
 gdb/osabi.c                   |    4 +-
 gdb/osdata.c                  |   16 ++--
 gdb/p-valprint.c              |    7 +-
 gdb/parse.c                   |    4 +-
 gdb/progspace.c               |    2 +-
 gdb/record.c                  |    8 +-
 gdb/reggroups.c               |    7 +-
 gdb/reverse.c                 |    2 +-
 gdb/scm-lang.c                |    2 +-
 gdb/scm-valprint.c            |    2 +-
 gdb/sentinel-frame.c          |    6 +-
 gdb/stabsread.c               |   22 +++--
 gdb/stack.c                   |   14 ++-
 gdb/target-descriptions.c     |   36 ++++---
 gdb/target-memory.c           |   12 ++-
 gdb/target.c                  |   49 +++++----
 gdb/thread.c                  |   13 ++-
 gdb/top.c                     |   15 ++--
 gdb/tramp-frame.c             |    3 +-
 gdb/ui-file.c                 |   50 +++++----
 gdb/ui-out.c                  |    7 +-
 gdb/user-regs.c               |   11 ++-
 gdb/utils.c                   |   36 +++---
 gdb/varobj.c                  |   10 +-
 gdb/vec.c                     |    2 +-
 gdb/xml-support.c             |   59 ++++++-----
 gdb/xml-syscall.c             |    8 +-
 gdb/xml-tdesc.c               |   46 ++++----
 97 files changed, 965 insertions(+), 730 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 1d4c38b..0a7e271 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -327,7 +327,7 @@ ada_inferior_data_cleanup (struct inferior *inf, void *arg)
 {
   struct ada_inferior_data *data;
 
-  data = inferior_data (inf, ada_inferior_data);
+  data = (struct ada_inferior_data *) inferior_data (inf, ada_inferior_data);
   if (data != NULL)
     xfree (data);
 }
@@ -345,7 +345,7 @@ get_ada_inferior_data (struct inferior *inf)
 {
   struct ada_inferior_data *data;
 
-  data = inferior_data (inf, ada_inferior_data);
+  data = (struct ada_inferior_data *) inferior_data (inf, ada_inferior_data);
   if (data == NULL)
     {
       data = XZALLOC (struct ada_inferior_data);
@@ -4014,7 +4014,7 @@ value_pointer (struct value *value, struct type *type)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
   unsigned len = TYPE_LENGTH (type);
-  gdb_byte *buf = alloca (len);
+  gdb_byte *buf = (gdb_byte *) alloca (len);
   CORE_ADDR addr;
 
   addr = value_address (value);
@@ -4246,7 +4246,7 @@ static struct ada_symbol_info *
 defns_collected (struct obstack *obstackp, int finish)
 {
   if (finish)
-    return obstack_finish (obstackp);
+    return (struct ada_symbol_info *) obstack_finish (obstackp);
   else
     return (struct ada_symbol_info *) obstack_base (obstackp);
 }
@@ -4649,7 +4649,7 @@ struct ada_psym_data
 static void
 ada_add_psyms (struct objfile *objfile, struct symtab *s, void *user_data)
 {
-  struct ada_psym_data *data = user_data;
+  struct ada_psym_data *data = (struct ada_psym_data *) user_data;
   const int block_kind = data->global ? GLOBAL_BLOCK : STATIC_BLOCK;
 
   ada_add_block_symbols (data->obstackp,
@@ -5278,19 +5278,19 @@ symbol_completion_add (VEC(char_ptr) **sv,
 
   if (word == orig_text)
     {
-      completion = xmalloc (strlen (match) + 5);
+      completion = (char *) xmalloc (strlen (match) + 5);
       strcpy (completion, match);
     }
   else if (word > orig_text)
     {
       /* Return some portion of sym_name.  */
-      completion = xmalloc (strlen (match) + 5);
+      completion = (char *) xmalloc (strlen (match) + 5);
       strcpy (completion, match + (word - orig_text));
     }
   else
     {
       /* Return some of ORIG_TEXT plus sym_name.  */
-      completion = xmalloc (strlen (match) + (orig_text - word) + 5);
+      completion = (char *) xmalloc (strlen (match) + (orig_text - word) + 5);
       strncpy (completion, word, orig_text - word);
       completion[orig_text - word] = '\0';
       strcat (completion, match);
@@ -5316,7 +5316,7 @@ struct add_partial_datum
 static void
 ada_add_partial_symbol_completions (const char *name, void *user_data)
 {
-  struct add_partial_datum *data = user_data;
+  struct add_partial_datum *data = (struct add_partial_datum *) user_data;
 
   symbol_completion_add (data->completions, name,
 			 data->text, data->text_len, data->text0, data->word,
@@ -5450,7 +5450,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
   {
     const size_t completions_size = 
       VEC_length (char_ptr, completions) * sizeof (char *);
-    char **result = malloc (completions_size);
+    char **result = (char **) malloc (completions_size);
     
     memcpy (result, VEC_address (char_ptr, completions), completions_size);
 
@@ -7482,7 +7482,8 @@ ada_to_fixed_type_1 (struct type *type, const gdb_byte *valaddr,
         else if (ada_type_name (fixed_record_type) != NULL)
           {
             char *name = ada_type_name (fixed_record_type);
-            char *xvz_name = alloca (strlen (name) + 7 /* "___XVZ\0" */);
+            char *xvz_name
+	      = (char *) alloca (strlen (name) + 7 /* "___XVZ\0" */);
             int xvz_found = 0;
             LONGEST size;
 
@@ -8301,7 +8302,7 @@ assign_aggregate (struct value *container,
 
   num_specs = num_component_specs (exp, *pos - 3);
   max_indices = 4 * num_specs + 4;
-  indices = alloca (max_indices * sizeof (indices[0]));
+  indices = (LONGEST *) alloca (max_indices * sizeof (indices[0]));
   indices[0] = indices[1] = low_index - 1;
   indices[2] = indices[3] = high_index + 1;
   num_indices = 4;
@@ -10771,7 +10772,7 @@ ada_get_next_arg (char **argsp)
 
   /* Make a copy of the current argument and return it.  */
 
-  result = xmalloc (end - args + 1);
+  result = (char *) xmalloc (end - args + 1);
   strncpy (result, args, end - args);
   result[end - args] = '\0';
   
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index e8836d2..af4bd36 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -44,7 +44,7 @@ simple_displaced_step_copy_insn (struct gdbarch *gdbarch,
                                  struct regcache *regs)
 {
   size_t len = gdbarch_max_insn_length (gdbarch);
-  gdb_byte *buf = xmalloc (len);
+  gdb_byte *buf = (gdb_byte *) xmalloc (len);
 
   read_memory (from, buf, len);
   write_memory (to, buf, len);
@@ -656,7 +656,7 @@ initialize_current_architecture (void)
     /* Append ``auto''. */
     int nr;
     for (nr = 0; arches[nr] != NULL; nr++);
-    arches = xrealloc (arches, sizeof (char*) * (nr + 2));
+    arches = (const char **) xrealloc (arches, sizeof (char*) * (nr + 2));
     arches[nr + 0] = "auto";
     arches[nr + 1] = NULL;
     add_setshow_enum_cmd ("architecture", class_support,
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 7d9180c..f20764a 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -257,7 +257,8 @@ bcache_full (const void *addr, int length, struct bcache *bcache, int *added)
   /* The user's string isn't in the list.  Insert it after *ps.  */
   {
     struct bstring *new
-      = obstack_alloc (&bcache->cache, BSTRING_SIZE (length));
+      = (struct bstring *) obstack_alloc (&bcache->cache,
+					  BSTRING_SIZE (length));
 
     memcpy (&new->d.data, addr, length);
     new->length = length;
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index e690a0c..b0bee14 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -974,7 +974,7 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
       for (pb = pending_blocks; pb != NULL; pb = pb->next)
 	count++;
 
-      barray = xmalloc (sizeof (*barray) * count);
+      barray = (struct block **) xmalloc (sizeof (*barray) * count);
       back_to = make_cleanup (xfree, barray);
 
       bp = barray;
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 40c4172..bcfee23 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -269,7 +269,7 @@ c_emit_char (int c, struct type *type,
 
   classify_type (type, get_type_arch (type), &encoding);
 
-  buf = alloca (TYPE_LENGTH (type));
+  buf = (gdb_byte *) alloca (TYPE_LENGTH (type));
   pack_long (buf, type, c);
 
   iter = make_wchar_iterator (buf, TYPE_LENGTH (type), encoding,
@@ -692,7 +692,7 @@ c_get_string (struct value *value, gdb_byte **buffer, int *length,
       /* I is now either a user-defined length, the number of non-null
  	 characters, or FETCHLIMIT.  */
       *length = i * width;
-      *buffer = xmalloc (*length);
+      *buffer = (gdb_byte *) xmalloc (*length);
       memcpy (*buffer, contents, *length);
       err = 0;
     }
@@ -786,7 +786,7 @@ emit_numeric_character (struct type *type, unsigned long value,
 {
   gdb_byte *buffer;
 
-  buffer = alloca (TYPE_LENGTH (type));
+  buffer = (gdb_byte *) alloca (TYPE_LENGTH (type));
   pack_long (buffer, type, value);
   obstack_grow (output, buffer, TYPE_LENGTH (type));
 }
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index de0559f..8ac8584 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -49,7 +49,7 @@ cli_table_begin (struct ui_out *uiout, int nbrofcols,
 		 int nr_rows,
 		 const char *tblid)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (nr_rows == 0)
     data->suppress_output = 1;
@@ -64,7 +64,7 @@ cli_table_begin (struct ui_out *uiout, int nbrofcols,
 static void
 cli_table_body (struct ui_out *uiout)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -77,7 +77,7 @@ cli_table_body (struct ui_out *uiout)
 static void
 cli_table_end (struct ui_out *uiout)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   data->suppress_output = 0;
 }
@@ -89,7 +89,7 @@ cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
 		  const char *col_name,
 		  const char *colhdr)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -107,7 +107,7 @@ cli_begin (struct ui_out *uiout,
 	   int level,
 	   const char *id)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -120,7 +120,7 @@ cli_end (struct ui_out *uiout,
 	 enum ui_out_type type,
 	 int level)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = ( cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -134,7 +134,7 @@ cli_field_int (struct ui_out *uiout, int fldno, int width,
 	       const char *fldname, int value)
 {
   char buffer[20];	/* FIXME: how many chars long a %d can become? */
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -152,7 +152,7 @@ cli_field_skip (struct ui_out *uiout, int fldno, int width,
 		enum ui_align alignment,
 		const char *fldname)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -175,7 +175,7 @@ cli_field_string (struct ui_out *uiout,
 {
   int before = 0;
   int after = 0;
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -223,7 +223,7 @@ cli_field_fmt (struct ui_out *uiout, int fldno,
 	       const char *format,
 	       va_list args)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -237,7 +237,7 @@ cli_field_fmt (struct ui_out *uiout, int fldno,
 static void
 cli_spaces (struct ui_out *uiout, int numspaces)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -247,7 +247,7 @@ cli_spaces (struct ui_out *uiout, int numspaces)
 static void
 cli_text (struct ui_out *uiout, const char *string)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -258,7 +258,7 @@ static void ATTRIBUTE_PRINTF (3, 0)
 cli_message (struct ui_out *uiout, int verbosity,
 	     const char *format, va_list args)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -269,7 +269,7 @@ cli_message (struct ui_out *uiout, int verbosity,
 static void
 cli_wrap_hint (struct ui_out *uiout, char *identstring)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (data->suppress_output)
     return;
@@ -279,7 +279,7 @@ cli_wrap_hint (struct ui_out *uiout, char *identstring)
 static void
 cli_flush (struct ui_out *uiout)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   gdb_flush (data->stream);
 }
@@ -287,7 +287,7 @@ cli_flush (struct ui_out *uiout)
 static int
 cli_redirect (struct ui_out *uiout, struct ui_file *outstream)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   if (outstream != NULL)
     {
@@ -314,7 +314,7 @@ out_field_fmt (struct ui_out *uiout, int fldno,
 	       const char *fldname,
 	       const char *format,...)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
   va_list args;
 
   va_start (args, format);
@@ -328,7 +328,7 @@ out_field_fmt (struct ui_out *uiout, int fldno,
 static void
 field_separator (void)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
 
   fputc_filtered (' ', data->stream);
 }
@@ -384,7 +384,7 @@ cli_out_new (struct ui_file *stream)
 struct ui_file *
 cli_out_set_stream (struct ui_out *uiout, struct ui_file *stream)
 {
-  cli_out_data *data = ui_out_data (uiout);
+  cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
   struct ui_file *old = data->stream;
 
   data->stream = stream;
diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c
index 3e2b89c..a6f4ea2 100644
--- a/gdb/coff-pe-read.c
+++ b/gdb/coff-pe-read.c
@@ -81,7 +81,8 @@ read_pe_section_index (const char *section_name)
 static void
 get_section_vmas (bfd *abfd, asection *sectp, void *context)
 {
-  struct read_pe_section_data *sections = context;
+  struct read_pe_section_data *sections
+    = (struct read_pe_section_data *) context;
   int sectix = read_pe_section_index (sectp->name);
 
   if (sectix != PE_SECTION_INDEX_INVALID)
@@ -113,7 +114,7 @@ add_pe_exported_sym (char *sym_name,
      of the dll name, e.g. KERNEL32!AddAtomA. This matches the style
      used by windbg from the "Microsoft Debugging Tools for Windows". */
 
-  qualified_name = xmalloc (dll_name_len + strlen (sym_name) + 2);
+  qualified_name = (char *) xmalloc (dll_name_len + strlen (sym_name) + 2);
 
   strncpy (qualified_name, dll_name, dll_name_len);
   qualified_name[dll_name_len] = '!';
@@ -171,7 +172,7 @@ pe_get32 (bfd *abfd, int where)
 static unsigned int
 pe_as32 (void *ptr)
 {
-  unsigned char *b = ptr;
+  unsigned char *b = (unsigned char *) ptr;
 
   return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
 }
diff --git a/gdb/completer.c b/gdb/completer.c
index 3ba481e..9f4efe7 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -159,7 +159,7 @@ filename_completer (struct cmd_list_element *ignore, char *text, char *word)
       else if (word > text)
 	{
 	  /* Return some portion of p.  */
-	  q = xmalloc (strlen (p) + 5);
+	  q = (char *) xmalloc (strlen (p) + 5);
 	  strcpy (q, p + (word - text));
 	  return_val[return_val_used++] = q;
 	  xfree (p);
@@ -167,7 +167,7 @@ filename_completer (struct cmd_list_element *ignore, char *text, char *word)
       else
 	{
 	  /* Return some of TEXT plus p.  */
-	  q = xmalloc (strlen (p) + (text - word) + 5);
+	  q = (char *) xmalloc (strlen (p) + (text - word) + 5);
 	  strncpy (q, word, text - word);
 	  q[text - word] = '\0';
 	  strcat (q, p);
@@ -295,7 +295,8 @@ location_completer (struct cmd_list_element *ignore, char *text, char *word)
      fn_list[] onto the end of list[].  */
   if (n_syms && n_files)
     {
-      list = xrealloc (list, (n_syms + n_files + 1) * sizeof (char *));
+      list = (char **) xrealloc (list,
+				 (n_syms + n_files + 1) * sizeof (char *));
       memcpy (list + n_syms, fn_list, (n_files + 1) * sizeof (char *));
       xfree (fn_list);
     }
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 7c1db86..242726c 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -355,7 +355,7 @@ read_memory_string (CORE_ADDR memaddr, char *buffer, int max_len)
 CORE_ADDR
 read_memory_typed_address (CORE_ADDR addr, struct type *type)
 {
-  gdb_byte *buf = alloca (TYPE_LENGTH (type));
+  gdb_byte *buf = (gdb_byte *) alloca (TYPE_LENGTH (type));
 
   read_memory (addr, buf, TYPE_LENGTH (type));
   return extract_typed_address (buf, type);
@@ -378,7 +378,7 @@ write_memory_unsigned_integer (CORE_ADDR addr, int len,
 			       enum bfd_endian byte_order,
 			       ULONGEST value)
 {
-  gdb_byte *buf = alloca (len);
+  gdb_byte *buf = (gdb_byte *) alloca (len);
 
   store_unsigned_integer (buf, len, byte_order, value);
   write_memory (addr, buf, len);
@@ -390,7 +390,7 @@ write_memory_signed_integer (CORE_ADDR addr, int len,
 			     enum bfd_endian byte_order,
 			     LONGEST value)
 {
-  gdb_byte *buf = alloca (len);
+  gdb_byte *buf = (gdb_byte *) alloca (len);
 
   store_signed_integer (buf, len, byte_order, value);
   write_memory (addr, buf, len);
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 0daf732..04790df 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -101,8 +101,8 @@ cp_scan_for_anonymous_namespaces (const struct symbol *symbol)
 	      int dest_len = (previous_component == 0 ? 0 : previous_component - 2);
 	      int src_len = next_component;
 
-	      char *dest = alloca (dest_len + 1);
-	      char *src = alloca (src_len + 1);
+	      char *dest = (char *) alloca (dest_len + 1);
+	      char *src = (char *) alloca (src_len + 1);
 
 	      memcpy (dest, name, dest_len);
 	      memcpy (src, name, src_len);
@@ -161,7 +161,7 @@ cp_add_using_directive (const char *dest,
 	return;
     }
 
-  new = OBSTACK_ZALLOC (obstack, struct using_direct);
+  new = (struct using_direct *) OBSTACK_ZALLOC (obstack, struct using_direct);
 
   new->import_src = obsavestring (src, strlen (src), obstack);
   new->import_dest = obsavestring (dest, strlen (dest), obstack);
@@ -262,8 +262,8 @@ cp_lookup_symbol_in_namespace (const char *namespace,
     }
   else
     {
-      char *concatenated_name = alloca (strlen (namespace) + 2 +
-                                        strlen (name) + 1);
+      char *concatenated_name = (char *) alloca (strlen (namespace) + 2 +
+						 strlen (name) + 1);


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-15 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-15 12:45 [SCM] archer-ratmice-compile-Wc++-compat: Add explicit casts from void pointer ratmice
  -- strict thread matches above, loose matches on Subject: below --
2010-06-12 20:13 ratmice

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).