From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19352 invoked by alias); 15 Sep 2010 12:45:16 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 19321 invoked by uid 9851); 15 Sep 2010 12:45:15 -0000 Date: Wed, 15 Sep 2010 12:45:00 -0000 Message-ID: <20100915124515.19306.qmail@sourceware.org> From: ratmice@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-ratmice-compile-Wc++-compat: Add explicit casts from void pointer. X-Git-Refname: refs/heads/archer-ratmice-compile-Wc++-compat X-Git-Reftype: branch X-Git-Oldrev: fcdc82f8a7ed37b03fb865db85c93507db639425 X-Git-Newrev: 584e049d4ac847fe6af33741ece6597b3d7b0e14 X-SW-Source: 2010-q3/txt/msg00088.txt.bz2 List-Id: 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 Date: Wed Sep 15 05:36:52 2010 -0700 Add explicit casts from void pointer. commit 529d09958c00553523cd3550d0eaa0fc1cf1e3f4 Author: matt rice 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 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); } @@ -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, ®names); 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.