+Fri Jul 3 20:18:26 1992 Fred Fish (fnf@cygnus.com)
+
+ * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
+ core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c,
+ eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c,
+ i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c,
+ infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c,
+ putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c,
+ sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c,
+ tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c,
+ values.c, xcoffread.c:
+ Remove "(void)" casts from function calls where the return value
+ is ignored, in accordance with GNU coding standards.
+
Fri Jul 3 00:00:49 1992 John Gilmore (gnu at cygnus.com)
* dbxread.c (process_one_symbol): Ignore N_MAIN, N_ENDM for Solaris.
bptlen -= (membpt + bptlen) - (memaddr + len);
}
- (void) memcpy (myaddr + membpt - memaddr,
- b->shadow_contents + bptoffset, bptlen);
+ memcpy (myaddr + membpt - memaddr,
+ b->shadow_contents + bptoffset, bptlen);
if (membpt > memaddr)
{
for (; bs != NULL; bs = bs->next)
{
tmp = (bpstat) xmalloc (sizeof (*tmp));
- (void) memcpy (tmp, bs, sizeof (*tmp));
+ memcpy (tmp, bs, sizeof (*tmp));
if (p == NULL)
/* This is the first thing in the chain. */
retval = tmp;
register struct breakpoint *b, *b1;
b = (struct breakpoint *) xmalloc (sizeof (struct breakpoint));
- (void) memset (b, 0, sizeof (*b));
+ memset (b, 0, sizeof (*b));
b->address = sal.pc;
b->symtab = sal.symtab;
b->line_number = sal.line;
bl = blockvector_for_pc (BLOCK_END (block) - 4, &index);
blocks_searched = (char *) alloca (BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
- (void) memset (blocks_searched, 0, BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
+ memset (blocks_searched, 0, BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
while (block != 0)
{
ALL_BREAKPOINTS_SAFE (b, temp)
{
sprintf (message, message1, b->number); /* Format possible error msg */
- (void) catch_errors (breakpoint_re_set_one, (char *) b, message);
+ catch_errors (breakpoint_re_set_one, (char *) b, message);
}
create_longjmp_breakpoint("longjmp");
type_vector = (struct type **)
xrealloc ((char *) type_vector,
(type_vector_length * sizeof (struct type *)));
- (void) memset (&type_vector[old_len], 0,
+ memset (&type_vector[old_len], 0,
(type_vector_length - old_len) * sizeof (struct type *));
}
return &type_vector[index];
f->length *= 2;
f->vector = (struct type **)
xrealloc ((char *) f->vector, f->length * sizeof (struct type *));
- (void) memset (&f->vector[f_orig_length], 0,
+ memset (&f->vector[f_orig_length], 0,
(f->length - f_orig_length) * sizeof (struct type *));
}
return &f->vector[index];
buildsym_new_init ()
{
/* Empty the hash table of global syms looking for values. */
- (void) memset (global_sym_chain, 0, sizeof global_sym_chain);
+ memset (global_sym_chain, 0, sizeof global_sym_chain);
buildsym_init ();
}
/* Create range type. */
range_type = (struct type *)
obstack_alloc (&objfile -> type_obstack, sizeof (struct type));
- (void) memset (range_type, 0, sizeof (struct type));
+ memset (range_type, 0, sizeof (struct type));
TYPE_OBJFILE (range_type) = objfile;
TYPE_CODE (range_type) = TYPE_CODE_RANGE;
TYPE_TARGET_TYPE (range_type) = index_type;
n = read_number (pp, ',');
sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack, sizeof (struct symbol));
- (void) memset (sym, 0, sizeof (struct symbol));
+ memset (sym, 0, sizeof (struct symbol));
SYMBOL_NAME (sym) = name;
SYMBOL_CLASS (sym) = LOC_CONST;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
result_type = (struct type *)
obstack_alloc (&objfile -> type_obstack,
sizeof (struct type));
- (void) memset (result_type, 0, sizeof (struct type));
+ memset (result_type, 0, sizeof (struct type));
TYPE_OBJFILE (result_type) = objfile;
TYPE_LENGTH (result_type) = nbits / TARGET_CHAR_BIT;
TYPE_CODE (result_type) = TYPE_CODE_INT;
result_type = (struct type *)
obstack_alloc (&objfile -> type_obstack, sizeof (struct type));
- (void) memset (result_type, 0, sizeof (struct type));
+ memset (result_type, 0, sizeof (struct type));
TYPE_OBJFILE (result_type) = objfile;
TYPE_CODE (result_type) = TYPE_CODE_RANGE;
TYPE_FIELDS (result_type) =
(struct field *) obstack_alloc (&objfile -> type_obstack,
2 * sizeof (struct field));
- (void) memset (TYPE_FIELDS (result_type), 0, 2 * sizeof (struct field));
+ memset (TYPE_FIELDS (result_type), 0, 2 * sizeof (struct field));
TYPE_FIELD_BITPOS (result_type, 0) = n2;
TYPE_FIELD_BITPOS (result_type, 1) = n3;
else if (TYPE_CODE (types[n-1]) != TYPE_CODE_VOID)
{
rval = (struct type **) xmalloc ((n + 1) * sizeof (struct type *));
- (void) memset (rval + n, 0, sizeof (struct type *));
+ memset (rval + n, 0, sizeof (struct type *));
}
else
{
{
char *err_copy = (char *) alloca (p - tokstart + 1);
- (void) memcpy (err_copy, tokstart, p - tokstart);
+ memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy);
}
type_vector = (struct type **)
xrealloc ((char *) type_vector,
type_vector_length * sizeof (struct type *));
- (void) memset (&type_vector[old_vector_length], 0,
+ memset (&type_vector[old_vector_length], 0,
(type_vector_length - old_vector_length) * sizeof(struct type *));
}
return &type_vector[index];
nlist_stream_global = stream;
nlist_nsyms_global = nsyms;
last_source_file = 0;
- (void) memset (opaque_type_chain, 0, sizeof opaque_type_chain);
+ memset (opaque_type_chain, 0, sizeof opaque_type_chain);
if (type_vector) /* Get rid of previous one */
free ((PTR)type_vector);
type_vector_length = 160;
type_vector = (struct type **)
xmalloc (type_vector_length * sizeof (struct type *));
- (void) memset (type_vector, 0, type_vector_length * sizeof (struct type *));
+ memset (type_vector, 0, type_vector_length * sizeof (struct type *));
coff_start_symtab ();
break;
}
}
- (void) process_coff_symbol (cs, &main_aux, objfile);
+ process_coff_symbol (cs, &main_aux, objfile);
break;
case C_FCN:
break;
default:
- (void) process_coff_symbol (cs, &main_aux, objfile);
+ process_coff_symbol (cs, &main_aux, objfile);
break;
}
}
if (stringtab == NULL)
return -1;
- (void) memcpy (stringtab, &length, sizeof length);
+ memcpy (stringtab, &length, sizeof length);
if (length == sizeof length) /* Empty table -- just the count */
return 0;
return -1;
/* Terminate it with an all-zero sentinel record */
- (void) memset (linetab + size, 0, local_linesz);
+ memset (linetab + size, 0, local_linesz);
make_cleanup (free, linetab); /* Be sure it gets de-allocated. */
return 0;
TYPE_FIELDS (target) = (struct field *)
obstack_alloc (¤t_objfile -> type_obstack, field_size);
- (void) memcpy (TYPE_FIELDS (target), TYPE_FIELDS (real_target), field_size);
+ memcpy (TYPE_FIELDS (target), TYPE_FIELDS (real_target), field_size);
if (TYPE_NAME (real_target))
{
#endif
struct type *temptype;
- (void) memset (sym, 0, sizeof (struct symbol));
+ memset (sym, 0, sizeof (struct symbol));
name = cs->c_name;
name = (name[0] == '_' ? name + offset : name);
SYMBOL_NAME (sym) = obstack_copy0 (&objfile->symbol_obstack, name, strlen (name));
struct type *new = (struct type *)
obstack_alloc (&objfile->symbol_obstack, sizeof (struct type));
- (void) memcpy (new, lookup_function_type (decode_function_type (cs, cs->c_type, aux)),
+ memcpy (new, lookup_function_type (decode_function_type (cs, cs->c_type, aux)),
sizeof(struct type));
SYMBOL_TYPE (sym) = new;
in_function_type = SYMBOL_TYPE(sym);
type = (struct type *)
obstack_alloc (¤t_objfile -> type_obstack,
sizeof (struct type));
- (void) memset (type, 0, sizeof (struct type));
+ memset (type, 0, sizeof (struct type));
TYPE_OBJFILE (type) = current_objfile;
base_type = decode_type (cs, new_c_type, aux);
{
case C_MOE:
sym = (struct symbol *) xmalloc (sizeof (struct symbol));
- (void) memset (sym, 0, sizeof (struct symbol));
+ memset (sym, 0, sizeof (struct symbol));
SYMBOL_NAME (sym) = savestring (name, strlen (name));
SYMBOL_CLASS (sym) = LOC_CONST;
struct cmd_list_element *showcmd =
(struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
- (void) memcpy (showcmd, setcmd, sizeof (struct cmd_list_element));
+ memcpy (showcmd, setcmd, sizeof (struct cmd_list_element));
delete_cmd (showcmd->name, list);
showcmd->type = show_cmd;
/* Add symbols and section mappings for any shared libraries */
#ifdef SOLIB_ADD
- (void) catch_errors (solib_add_stub, (char *)from_tty, (char *)0);
+ catch_errors (solib_add_stub, (char *)from_tty, (char *)0);
#endif
/* Now, set up the frame cache, and print the top of stack */
if ((mangled != NULL) && (*mangled != '\0'))
{
- (void) memset ((char *) work, 0, sizeof (work));
+ memset ((char *) work, 0, sizeof (work));
work -> options = options;
string_init (&decl);
header_files[i].length = 10;
header_files[i].vector
= (struct type **) xmalloc (10 * sizeof (struct type *));
- (void) memset (header_files[i].vector, 0, 10 * sizeof (struct type *));
+ memset (header_files[i].vector, 0, 10 * sizeof (struct type *));
add_this_object_header_file (i);
}
}
break; /* Ignore repeated SOs */
}
- (void) end_symtab (valu, 0, 0, objfile);
+ end_symtab (valu, 0, 0, objfile);
}
start_symtab (name, NULL, valu);
break;
int i;
struct symbol *sym =
(struct symbol *) xmmalloc (objfile -> md, sizeof (struct symbol));
- (void) memset (sym, 0, sizeof *sym);
+ memset (sym, 0, sizeof *sym);
SYMBOL_NAME (sym) = savestring (name, strlen (name));
SYMBOL_CLASS (sym) = LOC_BLOCK;
SYMBOL_NAMESPACE (sym) = (enum namespace)((long)
{
register struct context_stack *new;
- (void) push_context (0, dip -> at_low_pc);
+ push_context (0, dip -> at_low_pc);
process_dies (thisdie + dip -> die_length, enddie, objfile);
new = pop_context ();
if (local_symbols != NULL)
utypep = (struct type *)
obstack_alloc (¤t_objfile -> type_obstack,
sizeof (struct type));
- (void) memset (utypep, 0, sizeof (struct type));
+ memset (utypep, 0, sizeof (struct type));
TYPE_OBJFILE (utypep) = current_objfile;
}
*typep = utypep;
typep = (struct type *)
obstack_alloc (¤t_objfile -> type_obstack,
sizeof (struct type));
- (void) memset (typep, 0, sizeof (struct type));
+ memset (typep, 0, sizeof (struct type));
TYPE_OBJFILE (typep) = current_objfile;
TYPE_CODE (typep) = TYPE_CODE_ARRAY;
TYPE_LENGTH (typep) = TYPE_LENGTH (nexttype);
{
if ((utype = lookup_utype (dip -> die_ref)) == NULL)
{
- (void) alloc_utype (dip -> die_ref, type);
+ alloc_utype (dip -> die_ref, type);
}
else
{
if ((utype = lookup_utype (dip -> die_ref)) == NULL)
{
utype = lookup_pointer_type (type);
- (void) alloc_utype (dip -> die_ref, utype);
+ alloc_utype (dip -> die_ref, utype);
}
else
{
/* This is the first reference to one of these types. Make
a new one and place it in the user defined types. */
ftype = lookup_function_type (type);
- (void) alloc_utype (dip -> die_ref, ftype);
+ alloc_utype (dip -> die_ref, ftype);
}
else
{
/* Handcraft a new symbol for this enum member. */
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol));
- (void) memset (sym, 0, sizeof (struct symbol));
+ memset (sym, 0, sizeof (struct symbol));
SYMBOL_NAME (sym) = create_name (list -> field.name,
&objfile->symbol_obstack);
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
numutypes = (enddie - thisdie) / 4;
utypes = (struct type **) xmalloc (numutypes * sizeof (struct type *));
back_to = make_cleanup (free, utypes);
- (void) memset (utypes, 0, numutypes * sizeof (struct type *));
+ memset (utypes, 0, numutypes * sizeof (struct type *));
start_symtab (dip -> at_name, NULL, dip -> at_low_pc);
decode_line_numbers (lnbase);
process_dies (thisdie + dip -> die_length, enddie, objfile);
read_tag_pointer_type (&di);
break;
default:
- (void) new_symbol (&di, objfile);
+ new_symbol (&di, objfile);
break;
}
}
{
sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack,
sizeof (struct symbol));
- (void) memset (sym, 0, sizeof (struct symbol));
+ memset (sym, 0, sizeof (struct symbol));
SYMBOL_NAME (sym) = create_name (dip -> at_name, &objfile->symbol_obstack);
/* default assumptions */
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
length = strlen (name) + 1;
newname = (char *) obstack_alloc (obstackp, length);
- (void) strcpy (newname, name);
+ strcpy (newname, name);
return (newname);
}
struct objfile *objfile;
{
curdie = dip;
- (void) memset (dip, 0, sizeof (struct dieinfo));
+ memset (dip, 0, sizeof (struct dieinfo));
dip -> die = diep;
dip -> die_ref = dbroff + (diep - dbbase);
dip -> die_length = target_to_host (diep, SIZEOF_DIE_LENGTH, GET_UNSIGNED,
/* Now process debugging information, which is contained in
special ELF sections. We first have to find them... */
- (void) memset ((char *) &ei, 0, sizeof (ei));
+ memset ((char *) &ei, 0, sizeof (ei));
bfd_map_over_sections (abfd, elf_locate_sections, (PTR) &ei);
if (ei.dboffset && ei.lnoffset)
{
type = (struct type *) obstack_alloc (&objfile -> type_obstack,
sizeof (struct type));
}
- (void) memset ((char *)type, 0, sizeof (struct type));
+ memset ((char *)type, 0, sizeof (struct type));
/* Initialize the fields that might not be zero. */
objfile = TYPE_OBJFILE (type);
- (void) memset ((char *)type, 0, sizeof (struct type));
+ memset ((char *)type, 0, sizeof (struct type));
TYPE_OBJFILE (type) = objfile;
TYPE_TARGET_TYPE (type) = to_type;
TYPE_DOMAIN_TYPE (type) = domain;
objfile = TYPE_OBJFILE (type);
- (void) memset ((char *)type, 0, sizeof (struct type));
+ memset ((char *)type, 0, sizeof (struct type));
TYPE_OBJFILE (type) = objfile;
TYPE_TARGET_TYPE (type) = to_type;
TYPE_DOMAIN_TYPE (type) = domain;
nbytes = FT_NUM_MEMBERS * sizeof (struct type *);
objfile -> fundamental_types = (struct type **)
obstack_alloc (&objfile -> type_obstack, nbytes);
- (void) memset ((char *)objfile -> fundamental_types, 0, nbytes);
+ memset ((char *)objfile -> fundamental_types, 0, nbytes);
}
typep = objfile -> fundamental_types + typeid;
if ((type = *typep) == NULL)
}
#ifdef MACHKERNELDEBUG
else if (kerneltype == OS_MACH) {
- (void) mach_vtophys(space, addr, &phys);
+ mach_vtophys(space, addr, &phys);
}
#endif
#if 0
panicstr = kvread(ksym_lookup("panicstr"));
if (panicstr == ~0)
return;
- (void) kernel_core_file_hook(panicstr, buf, sizeof(buf));
+ kernel_core_file_hook(panicstr, buf, sizeof(buf));
for (cp = buf; cp < &buf[sizeof(buf)] && *cp; cp++)
if (!isascii(*cp) || (!isprint(*cp) && !isspace(*cp)))
*cp = '?';
}
#ifdef MACHKERNELDEBUG
else if (kerneltype == OS_MACH) {
- (void) mach_vtophys(space, addr, &phys);
+ mach_vtophys(space, addr, &phys);
}
#endif
#if 0
panicstr = kvread(ksym_lookup("panicstr"));
if (panicstr == ~0)
return;
- (void) kernel_core_file_hook(panicstr, buf, sizeof(buf));
+ kernel_core_file_hook(panicstr, buf, sizeof(buf));
for (cp = buf; cp < &buf[sizeof(buf)] && *cp; cp++)
if (!isascii(*cp) || (!isprint(*cp) && !isspace(*cp)))
*cp = '?';
unsigned long mant0, mant1, exponent;
unsigned char tobytes[8];
- (void) memset (to, 0, TOTALSIZE);
+ memset (to, 0, TOTALSIZE);
if (dfrom == 0)
return; /* Result is zero */
if (dfrom != dfrom) {
/* On return, the stack dummy has been popped already. */
- (void) memcpy (buffer, stop_registers, sizeof stop_registers);
+ memcpy (buffer, stop_registers, sizeof stop_registers);
}
\f
/* Proceed until we reach a different source line with pc greater than
{
char *err_copy = (char *) alloca (p - tokstart + 1);
- (void) memcpy (err_copy, tokstart, p - tokstart);
+ memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy);
}
{
PTR p = xmalloc (size);
- (void) memset (p, 0, size);
+ memset (p, 0, size);
return p;
}
is the displacement from the procedure`s start
address of the end of this block. */
BLOCK_END(top_stack->cur_block) = sh->value + top_stack->procadr;
- (void) shrink_block(top_stack->cur_block, top_stack->cur_st);
+ shrink_block(top_stack->cur_block, top_stack->cur_st);
} else complain (&stEnd_complaint, (char *)sh->sc);
pop_parse_stack(); /* restore previous lexical context */
if (((mapto = map_to_address ()) == 0) ||
((md = mmalloc_attach (fd, (void *) mapto)) == NULL))
{
- (void) close (fd);
+ close (fd);
}
else if ((objfile = (struct objfile *) mmalloc_getkey (md, 0)) != NULL)
{
the first malloc. See comments in init_malloc() and mmcheck(). */
init_malloc (md);
objfile = (struct objfile *) xmmalloc (md, sizeof (struct objfile));
- (void) memset (objfile, 0, sizeof (struct objfile));
+ memset (objfile, 0, sizeof (struct objfile));
objfile -> md = md;
objfile -> mmfd = fd;
objfile -> flags |= OBJF_MAPPED;
if (objfile == NULL)
{
objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
- (void) memset (objfile, 0, sizeof (struct objfile));
+ memset (objfile, 0, sizeof (struct objfile));
objfile -> md = NULL;
obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, xmalloc, free,
(void *) 0, 0);
mmfd = objfile -> mmfd;
mmalloc_detach (objfile -> md);
objfile = NULL;
- (void) close (mmfd);
+ close (mmfd);
}
#endif /* !defined(NO_MMALLOC) && defined(HAVE_MMAP) */
xrealloc ((char *) expout, (sizeof (struct expression)
+ (expout_size * sizeof (union exp_element))));
}
- (void) memcpy ((char *) &expout->elts[expout_ptr - lenelt], str.ptr, len);
+ memcpy ((char *) &expout->elts[expout_ptr - lenelt], str.ptr, len);
((char *) &expout->elts[expout_ptr - lenelt])[len] = 0;
write_exp_elt_longcst ((LONGEST) len);
}
copy_name (token)
struct stoken token;
{
- (void) memcpy (namecopy, token.ptr, token.length);
+ memcpy (namecopy, token.ptr, token.length);
namecopy[token.length] = 0;
return namecopy;
}
temp = (struct expression *) alloca (len);
/* Copy the original expression into temp. */
- (void) memcpy (temp, expr, len);
+ memcpy (temp, expr, len);
prefixify_subexp (temp, expr, inpos, outpos);
}
/* Copy the final operator itself, from the end of the input
to the beginning of the output. */
inend -= oplen;
- (void) memcpy (&outexpr->elts[outbeg], &inexpr->elts[inend],
+ memcpy (&outexpr->elts[outbeg], &inexpr->elts[inend],
oplen * sizeof (union exp_element));
outbeg += oplen;
free (locbuf);
}
locbuf = xmalloc (strlen (prefix) + 16);
- (void) sprintf (locbuf, "%s %u", prefix, val);
+ sprintf (locbuf, "%s %u", prefix, val);
name = locbuf;
}
return (name);
}
if (name == NULL)
{
- (void) sprintf (locbuf, "sigcode %u", sip -> si_signo);
+ sprintf (locbuf, "sigcode %u", sip -> si_signo);
name = locbuf;
}
return (name);
}
else
{
- (void) sprintf (locbuf, "syscall %u", syscallnum);
+ sprintf (locbuf, "syscall %u", syscallnum);
rtnval = locbuf;
}
return (rtnval);
int signo;
signo = SIGKILL;
- (void) ioctl (pi.fd, PIOCKILL, &signo);
+ ioctl (pi.fd, PIOCKILL, &signo);
close_proc_file (&pi);
wait ((int *) 0);
}
{
if (regno != -1)
{
- (void) ioctl (pi.fd, PIOCGREG, &pi.gregset);
+ ioctl (pi.fd, PIOCGREG, &pi.gregset);
}
fill_gregset (&pi.gregset, regno);
- (void) ioctl (pi.fd, PIOCSREG, &pi.gregset);
+ ioctl (pi.fd, PIOCSREG, &pi.gregset);
#if defined (FP0_REGNUM)
if (regno != -1)
{
- (void) ioctl (pi.fd, PIOCGFPREG, &pi.fpregset);
+ ioctl (pi.fd, PIOCGFPREG, &pi.fpregset);
}
fill_fpregset (&pi.fpregset, regno);
- (void) ioctl (pi.fd, PIOCSFPREG, &pi.fpregset);
+ ioctl (pi.fd, PIOCSFPREG, &pi.fpregset);
#endif /* FP0_REGNUM */
}
else
{
- (void) memset ((char *) &pi.prrun, 0, sizeof (pi.prrun));
+ memset ((char *) &pi.prrun, 0, sizeof (pi.prrun));
prfillset (&pi.prrun.pr_trace);
proc_signal_handling_change ();
prfillset (&pi.prrun.pr_fault);
auto char procname[32];
int fd;
- (void) sprintf (procname, PROC_NAME_FMT, getpid ());
+ sprintf (procname, PROC_NAME_FMT, getpid ());
if ((fd = open (procname, O_RDWR)) < 0)
{
perror (procname);
{
long pr_flags;
pr_flags = PR_FORK;
- (void) ioctl (fd, PIOCRESET, &pr_flags);
+ ioctl (fd, PIOCRESET, &pr_flags);
}
#else
#if defined (PIOCRFORK) /* Original method */
- (void) ioctl (fd, PIOCRFORK, NULL);
+ ioctl (fd, PIOCRFORK, NULL);
#endif
#endif
}
/* Remember some things about the inferior that we will, or might, change
so that we can restore them when we detach. */
- (void) ioctl (pi.fd, PIOCGTRACE, &pi.saved_trace);
- (void) ioctl (pi.fd, PIOCGHOLD, &pi.saved_sighold);
- (void) ioctl (pi.fd, PIOCGFAULT, &pi.saved_fltset);
- (void) ioctl (pi.fd, PIOCGENTRY, &pi.saved_entryset);
- (void) ioctl (pi.fd, PIOCGEXIT, &pi.saved_exitset);
+ ioctl (pi.fd, PIOCGTRACE, &pi.saved_trace);
+ ioctl (pi.fd, PIOCGHOLD, &pi.saved_sighold);
+ ioctl (pi.fd, PIOCGFAULT, &pi.saved_fltset);
+ ioctl (pi.fd, PIOCGENTRY, &pi.saved_entryset);
+ ioctl (pi.fd, PIOCGEXIT, &pi.saved_exitset);
/* Set up trace and fault sets, as gdb expects them. */
- (void) memset (&pi.prrun, 0, sizeof (pi.prrun));
+ memset (&pi.prrun, 0, sizeof (pi.prrun));
prfillset (&pi.prrun.pr_trace);
proc_signal_handling_change ();
prfillset (&pi.prrun.pr_fault);
if (signal || !pi.was_stopped ||
query ("Was stopped when attached, make it runnable again? "))
{
- (void) memset (&pi.prrun, 0, sizeof (pi.prrun));
+ memset (&pi.prrun, 0, sizeof (pi.prrun));
pi.prrun.pr_flags = PRCFAULT;
if (ioctl (pi.fd, PIOCRUN, &pi.prrun))
{
}
else
{
- (void) memset ((char *) &newsiginfo, 0, sizeof (newsiginfo));
+ memset ((char *) &newsiginfo, 0, sizeof (newsiginfo));
sip = &newsiginfo;
sip -> si_signo = signo;
sip -> si_code = 0;
}
else
{
- (void) memcpy ((char *) &pi.gregset, core_reg_sect,
- sizeof (pi.gregset));
+ memcpy ((char *) &pi.gregset, core_reg_sect, sizeof (pi.gregset));
supply_gregset (&pi.gregset);
}
}
}
else
{
- (void) memcpy ((char *) &pi.fpregset, core_reg_sect,
- sizeof (pi.fpregset));
+ memcpy ((char *) &pi.fpregset, core_reg_sect, sizeof (pi.fpregset));
#if defined (FP0_REGNUM)
supply_fpregset (&pi.fpregset);
#endif
char *why;
{
print_sys_errmsg (pi.pathname, errno);
- (void) kill (pi.pid, SIGKILL);
+ kill (pi.pid, SIGKILL);
close_proc_file (&pi);
error (why);
/* NOTREACHED */
pip -> pid = 0;
if (pip -> valid)
{
- (void) close (pip -> fd);
+ close (pip -> fd);
}
pip -> fd = -1;
if (pip -> pathname)
pip -> valid = 0;
if (pip -> valid)
{
- (void) close (pip -> fd);
+ close (pip -> fd);
}
if (pip -> pathname == NULL)
{
{
pid = pii.pid;
pip = &pii;
- (void) memset (&pii, 0, sizeof (pii));
+ memset (&pii, 0, sizeof (pii));
if (!open_proc_file (pid, pip))
{
perror_with_name (pip -> pathname);
if ( new_environ == (char **) NULL )
return( -1 );
- (void) memcpy ((char *) new_environ, (char *) environ, size*PSIZE );
+ memcpy ((char *) new_environ, (char *) environ, size*PSIZE );
new_environ[size] = entry;
new_environ[size+1] = NULL;
/* You may need to do an init_target_mm() */
/* init_target_mm(?,?,?,?,?,?,?,?); */
immediate_quit--;
- /* (void) symbol_file_add (arg_string, from_tty, text_addr, 0, 0); */
+ /* symbol_file_add (arg_string, from_tty, text_addr, 0, 0); */
#endif
}
immediate_quit--;
/* FIXME, for now we ignore data_addr and bss_addr. */
- (void) symbol_file_add (arg_string, from_tty, text_addr, 0, 0, 0);
+ symbol_file_add (arg_string, from_tty, text_addr, 0, 0, 0);
}
#ifdef FIXME /* Not ready for prime time */
struct ldfile *pLoadFile = (struct ldfile *)arg;
printf("\t%s: ", pLoadFile->name);
- (void) symbol_file_add (pLoadFile->name, 0, pLoadFile->txt_addr, 0, 0, 0);
+ symbol_file_add (pLoadFile->name, 0, pLoadFile->txt_addr, 0, 0, 0);
printf ("ok\n");
return 1;
}
perror("ptrace_getregs");
registers[REGISTER_BYTE (0)] = 0;
- (void) memcpy (®isters[REGISTER_BYTE (1)], &inferior_registers.r_g1, 15 * REGISTER_RAW_SIZE (G0_REGNUM));
+ memcpy (®isters[REGISTER_BYTE (1)], &inferior_registers.r_g1,
+ 15 * REGISTER_RAW_SIZE (G0_REGNUM));
*(int *)®isters[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
*(int *)®isters[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
*(int *)®isters[REGISTER_BYTE (NPC_REGNUM)] = inferior_registers.r_npc;
(PTRACE_ARG3_TYPE) &inferior_fp_registers,
0))
perror("ptrace_getfpregs");
- (void) memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)],
- &inferior_fp_registers,
- sizeof inferior_fp_registers.fpu_fr);
+ memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
+ sizeof inferior_fp_registers.fpu_fr);
/* bcopy (&inferior_fp_registers.Fpu_fsr,
®isters[REGISTER_BYTE (FPS_REGNUM)],
sizeof (FPU_FSR_TYPE)); FIXME??? -- gnu@cyg */
{
if (!register_valid[G1_REGNUM]) abort();
- (void) memcpy (&inferior_registers.r_g1,
- ®isters[REGISTER_BYTE (G1_REGNUM)],
- 15 * REGISTER_RAW_SIZE (G1_REGNUM));
+ memcpy (&inferior_registers.r_g1, ®isters[REGISTER_BYTE (G1_REGNUM)],
+ 15 * REGISTER_RAW_SIZE (G1_REGNUM));
inferior_registers.r_ps =
*(int *)®isters[REGISTER_BYTE (PS_REGNUM)];
if (wanna_store & FP_REGS)
{
if (!register_valid[FP0_REGNUM+9]) abort();
- (void) memcpy (&inferior_fp_registers,
- ®isters[REGISTER_BYTE (FP0_REGNUM)],
- sizeof inferior_fp_registers.fpu_fr);
+ memcpy (&inferior_fp_registers, ®isters[REGISTER_BYTE (FP0_REGNUM)],
+ sizeof inferior_fp_registers.fpu_fr);
-/* (void) memcpy (&inferior_fp_registers.Fpu_fsr,
- ®isters[REGISTER_BYTE (FPS_REGNUM)],
- sizeof (FPU_FSR_TYPE));
+/* memcpy (&inferior_fp_registers.Fpu_fsr,
+ ®isters[REGISTER_BYTE (FPS_REGNUM)], sizeof (FPU_FSR_TYPE));
****/
if (0 !=
ptrace (PTRACE_SETFPREGS, inferior_pid,
*(int *)®isters[REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */
- (void) memcpy (®isters[REGISTER_BYTE (G1_REGNUM)],
- &gregs->r_g1,
- 15 * REGISTER_RAW_SIZE (G1_REGNUM));
+ memcpy (®isters[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
+ 15 * REGISTER_RAW_SIZE (G1_REGNUM));
*(int *)®isters[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
*(int *)®isters[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
*(int *)®isters[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
#define fpuregs ((struct fpu *) core_reg_sect)
if (core_reg_size >= sizeof (struct fpu))
{
- (void) memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)],
- fpuregs->fpu_regs,
- sizeof (fpuregs->fpu_regs));
- (void) memcpy (®isters[REGISTER_BYTE (FPS_REGNUM)],
- &fpuregs->fpu_fsr,
- sizeof (FPU_FSR_TYPE));
+ memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], fpuregs->fpu_regs,
+ sizeof (fpuregs->fpu_regs));
+ memcpy (®isters[REGISTER_BYTE (FPS_REGNUM)], &fpuregs->fpu_fsr,
+ sizeof (FPU_FSR_TYPE));
}
else
fprintf (stderr, "Couldn't read float regs from core file\n");
static void
find_sym_fns PARAMS ((struct objfile *));
-static void
+void
clear_symtab_users_once PARAMS ((void));
/* List of all available sym_fns. On gdb startup, each object file reader
psymtab != NULL;
psymtab = psymtab -> next)
{
- (void) psymtab_to_symtab (psymtab);
+ psymtab_to_symtab (psymtab);
}
}
/* Getting new symbols may change our opinion about what is
frameless. */
reinit_frame_cache ();
- (void) symbol_file_add (name, from_tty, (CORE_ADDR)0, 1,
- mapped, readnow);
+ symbol_file_add (name, from_tty, (CORE_ADDR)0, 1, mapped, readnow);
}
do_cleanups (cleanups);
}
reinit_frame_cache ();
- (void) symbol_file_add (name, 0, text_addr, 0, mapped, readnow);
+ symbol_file_add (name, 0, text_addr, 0, mapped, readnow);
}
\f
/* Re-read symbols if a symbol-file has changed. */
symtab = (struct symtab *)
obstack_alloc (&objfile -> symbol_obstack, sizeof (struct symtab));
- (void) memset (symtab, 0, sizeof (*symtab));
+ memset (symtab, 0, sizeof (*symtab));
symtab -> filename = obsavestring (filename, strlen (filename),
&objfile -> symbol_obstack);
symtab -> fullname = NULL;
obstack_alloc (&objfile -> psymbol_obstack,
sizeof (struct partial_symtab));
- (void) memset (psymtab, 0, sizeof (struct partial_symtab));
+ memset (psymtab, 0, sizeof (struct partial_symtab));
psymtab -> filename = obsavestring (filename, strlen (filename),
&objfile -> psymbol_obstack);
psymtab -> symtab = NULL;
static int clear_symtab_users_queued;
static int clear_symtab_users_done;
-static void
+void
clear_symtab_users_once ()
{
/* Enforce once-per-`do_cleanups'-semantics */
p1 = p;
while (p != *argptr && p[-1] == ' ') --p;
copy = (char *) alloca (p - *argptr + 1);
- (void) memcpy (copy, *argptr, p - *argptr);
+ memcpy (copy, *argptr, p - *argptr);
copy[p - *argptr] = 0;
/* Discard the class name from the arg. */
else
{
copy = (char *) alloca (p - *argptr + 1 + (q1 - q));
- (void) memcpy (copy, *argptr, p - *argptr);
+ memcpy (copy, *argptr, p - *argptr);
copy[p - *argptr] = '\0';
}
p1 = p;
while (p != *argptr && p[-1] == ' ') --p;
copy = (char *) alloca (p - *argptr + 1);
- (void) memcpy (copy, *argptr, p - *argptr);
+ memcpy (copy, *argptr, p - *argptr);
copy[p - *argptr] = 0;
/* Find that file's data. */
p = skip_quoted (*argptr);
copy = (char *) alloca (p - *argptr + 1);
- (void) memcpy (copy, *argptr, p - *argptr);
+ memcpy (copy, *argptr, p - *argptr);
copy[p - *argptr] = '\0';
if ((copy[0] == copy [p - *argptr - 1])
&& strchr (gdb_completer_quote_characters, copy[0]) != NULL)
values.sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
values.nelts = 1;
- (void) memset (&values.sals[0], 0, sizeof (values.sals[0]));
+ memset (&values.sals[0], 0, sizeof (values.sals[0]));
values.sals[0].symtab = sym_symtab;
values.sals[0].line = SYMBOL_LINE (sym);
return values;
error ("cancelled");
else if (num == 1)
{
- (void) memcpy (return_values.sals, values.sals,
- (nelts * sizeof(struct symtab_and_line)));
+ memcpy (return_values.sals, values.sals,
+ (nelts * sizeof(struct symtab_and_line)));
return_values.nelts = nelts;
return return_values;
}
|| (class == 2 && SYMBOL_CLASS (psym) == LOC_TYPEDEF)
|| (class == 3 && SYMBOL_CLASS (psym) == LOC_BLOCK)))
{
- (void) PSYMTAB_TO_SYMTAB(ps);
+ PSYMTAB_TO_SYMTAB(ps);
keep_going = 0;
}
}
#define B_TST(a,x) ((a)[(x)>>3] & (1 << ((x)&7)))
#define B_TYPE unsigned char
#define B_BYTES(x) ( 1 + ((x)>>3) )
-#define B_CLRALL(a,x) (void) memset ((a), 0, B_BYTES(x))
+#define B_CLRALL(a,x) memset ((a), 0, B_BYTES(x))
/* Define a simple structure used to hold some very basic information about
to virtual format for register REGNUM. */
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
- {(void) memcpy ((TO), (FROM), 4);}
+ {memcpy ((TO), (FROM), 4);}
/* Convert data from virtual format for register REGNUM
to raw format for register REGNUM. */
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
- {(void) memcpy ((TO), (FROM), 4);}
+ {memcpy ((TO), (FROM), 4);}
/* Return the GDB type object for the "standard" data type
of data in register N. */
into VALBUF. */
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- (void) memcpy ((VALBUF), (REGBUF), TYPE_LENGTH (TYPE))
+ memcpy ((VALBUF), (REGBUF), TYPE_LENGTH (TYPE))
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
to virtual format for register REGNUM. */
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
-{ (void) memcpy ((TO), (FROM), 4); }
+{ memcpy ((TO), (FROM), 4); }
/* Convert data from virtual format for register REGNUM
to raw format for register REGNUM. */
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
-{ (void) memcpy ((TO), (FROM), 4); }
+{ memcpy ((TO), (FROM), 4); }
/* Return the GDB type object for the "standard" data type
of data in register N. */
{ \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \
- (void) memcpy ((VALBUF), \
- ((int *)(REGBUF))+FP0_REGNUM, \
- TYPE_LENGTH(TYPE)); \
+ memcpy ((VALBUF), ((int *)(REGBUF))+FP0_REGNUM, TYPE_LENGTH(TYPE));\
} \
else \
- (void) memcpy ((VALBUF), \
- (char *)(REGBUF) + 4 * 8 + \
- (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
- TYPE_LENGTH(TYPE)); \
+ memcpy ((VALBUF), \
+ (char *)(REGBUF) + 4 * 8 + \
+ (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
+ TYPE_LENGTH(TYPE)); \
}
/* Write into appropriate registers a function return value
warning ("internal error: failed to install memory consistency checks");
}
- (void) mmtrace ();
+ mmtrace ();
}
#endif /* Have mmalloc and want corruption checking */
int size;
{
register char *p = (char *) xmalloc (size + 1);
- (void) memcpy (p, ptr, size);
+ memcpy (p, ptr, size);
p[size] = 0;
return p;
}
int size;
{
register char *p = (char *) xmmalloc (md, size + 1);
- (void) memcpy (p, ptr, size);
+ memcpy (p, ptr, size);
p[size] = 0;
return p;
}
/* This won't blow up if the restrictions described above are
followed. */
- (void) vsprintf (linebuffer, format, args);
+ vsprintf (linebuffer, format, args);
fputs_filtered (linebuffer, stream);
}
{
register value val = allocate_value (type);
- (void) memset (VALUE_CONTENTS (val), 0, TYPE_LENGTH (type));
+ memset (VALUE_CONTENTS (val), 0, TYPE_LENGTH (type));
VALUE_LVAL (val) = lv;
return val;
(int) value_as_long (fromval),
VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
else if (use_buffer)
- (void) memcpy (buffer + byte_offset, raw_buffer, use_buffer);
+ memcpy (buffer + byte_offset, raw_buffer, use_buffer);
else
- (void) memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
- TYPE_LENGTH (type));
+ memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
+ TYPE_LENGTH (type));
/* Copy it back. */
for ((regno = VALUE_FRAME_REGNUM (toval) + reg_offset,
}
val = allocate_value (type);
- (void) memcpy (val, toval, VALUE_CONTENTS_RAW (val) - (char *) val);
- (void) memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),
- TYPE_LENGTH (type));
+ memcpy (val, toval, VALUE_CONTENTS_RAW (val) - (char *) val);
+ memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),
+ TYPE_LENGTH (type));
VALUE_TYPE (val) = type;
return val;
/* Create a call sequence customized for this function
and the number of arguments for it. */
- (void) memcpy (dummy1, dummy, sizeof dummy);
+ memcpy (dummy1, dummy, sizeof dummy);
for (i = 0; i < sizeof dummy / sizeof (REGISTER_TYPE); i++)
SWAP_TARGET_AND_HOST (&dummy1[i], sizeof (REGISTER_TYPE));
FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
if (len == sizeof (float))
{
/* It's single precision. */
- (void) memcpy ((char *) &low, valaddr, sizeof (low));
+ memcpy ((char *) &low, valaddr, sizeof (low));
/* target -> host. */
SWAP_TARGET_AND_HOST (&low, sizeof (float));
nonnegative = low >= 0;
/* It's double precision. Get the high and low words. */
#if TARGET_BYTE_ORDER == BIG_ENDIAN
- (void) memcpy (&low, valaddr+4, sizeof (low));
- (void) memcpy (&high, valaddr+0, sizeof (high));
+ memcpy (&low, valaddr+4, sizeof (low));
+ memcpy (&high, valaddr+0, sizeof (high));
#else
- (void) memcpy (&low, valaddr+0, sizeof (low));
- (void) memcpy (&high, valaddr+4, sizeof (high));
+ memcpy (&low, valaddr+0, sizeof (low));
+ memcpy (&high, valaddr+4, sizeof (high));
#endif
- SWAP_TARGET_AND_HOST (&low, sizeof (low));
- SWAP_TARGET_AND_HOST (&high, sizeof (high));
- nonnegative = high >= 0;
- is_nan = (((high >> 20) & 0x7ff) == 0x7ff
- && ! ((((high & 0xfffff) == 0)) && (low == 0)));
- high &= 0xfffff;
- }
+ SWAP_TARGET_AND_HOST (&low, sizeof (low));
+ SWAP_TARGET_AND_HOST (&high, sizeof (high));
+ nonnegative = high >= 0;
+ is_nan = (((high >> 20) & 0x7ff) == 0x7ff
+ && ! ((((high & 0xfffff) == 0)) && (low == 0)));
+ high &= 0xfffff;
+ }
if (is_nan)
{
/* Check error now if about to store an invalid float. We return -1
to the caller, but allow them to continue, e.g. to print it as "Nan". */
- if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FLT) {
- (void) unpack_double (VALUE_TYPE (val), VALUE_CONTENTS (val), &i);
- if (i) return -1; /* Indicate value not saved in history */
- }
+ if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FLT)
+ {
+ unpack_double (VALUE_TYPE (val), VALUE_CONTENTS (val), &i);
+ if (i) return -1; /* Indicate value not saved in history */
+ }
/* Here we treat value_history_count as origin-zero
and applying to the value being stored now. */
register struct value_history_chunk *new
= (struct value_history_chunk *)
xmalloc (sizeof (struct value_history_chunk));
- (void) memset (new->values, 0, sizeof new->values);
+ memset (new->values, 0, sizeof new->values);
new->next = value_history_chain;
value_history_chain = new;
}
modify_field (addr, (int) value_as_long (newval),
bitpos, bitsize);
else
- (void) memcpy (addr, VALUE_CONTENTS (newval),
- TYPE_LENGTH (VALUE_TYPE (newval)));
+ memcpy (addr, VALUE_CONTENTS (newval), TYPE_LENGTH (VALUE_TYPE (newval)));
}
void
if (len == sizeof (float))
{
float retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (double))
{
double retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (short))
{
unsigned short retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (int))
{
unsigned int retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (long))
{
unsigned long retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (long long))
{
unsigned long long retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (char))
{
SIGNED char retval; /* plain chars might be unsigned on host */
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (short))
{
short retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (int))
{
int retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (long))
{
long retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (long long))
{
long long retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof(long))
{
unsigned long retval;
- (void) memcpy (&retval, valaddr, sizeof(retval));
+ memcpy (&retval, valaddr, sizeof(retval));
SWAP_TARGET_AND_HOST (&retval, sizeof(retval));
return retval;
}
else if (len == sizeof(short))
{
unsigned short retval;
- (void) memcpy (&retval, valaddr, len);
+ memcpy (&retval, valaddr, len);
SWAP_TARGET_AND_HOST (&retval, len);
return retval;
}
if (len == sizeof (float))
{
float retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (double))
{
double retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (len == sizeof (CORE_ADDR))
{
CORE_ADDR retval;
- (void) memcpy (&retval, valaddr, sizeof (retval));
+ memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval;
}
if (VALUE_LAZY (arg1))
VALUE_LAZY (v) = 1;
else
- (void) memcpy (VALUE_CONTENTS_RAW (v),
- VALUE_CONTENTS_RAW (arg1) + offset, TYPE_LENGTH (type));
+ memcpy (VALUE_CONTENTS_RAW (v), VALUE_CONTENTS_RAW (arg1) + offset,
+ TYPE_LENGTH (type));
}
VALUE_LVAL (v) = VALUE_LVAL (arg1);
if (VALUE_LVAL (arg1) == lval_internalvar)
know that we aren't happy, but don't throw an error.
FIXME: there has to be a better way to do this. */
struct type *error_type = (struct type *)xmalloc (sizeof (struct type));
- (void) memcpy (error_type, VALUE_TYPE (arg), sizeof (struct type));
+ memcpy (error_type, VALUE_TYPE (arg), sizeof (struct type));
TYPE_NAME (error_type) = savestring ("suspicious *", sizeof ("suspicious *"));
VALUE_TYPE (arg) = error_type;
return arg;
int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
int lsbcount;
- (void) memcpy (&val, valaddr + bitpos / 8, sizeof (val));
+ memcpy (&val, valaddr + bitpos / 8, sizeof (val));
SWAP_TARGET_AND_HOST (&val, sizeof (val));
/* Extract bits. See comment above. */
&& 0 != (fieldval & ~((1<<bitsize)-1)))
error ("Value %d does not fit in %d bits.", fieldval, bitsize);
- (void) memcpy (&oword, addr, sizeof oword);
+ memcpy (&oword, addr, sizeof oword);
SWAP_TARGET_AND_HOST (&oword, sizeof oword); /* To host format */
/* Shifting for bit field depends on endianness of the target machine. */
oword |= fieldval << bitpos;
SWAP_TARGET_AND_HOST (&oword, sizeof oword); /* To target format */
- (void) memcpy (addr, &oword, sizeof oword);
+ memcpy (addr, &oword, sizeof oword);
}
\f
/* Convert C numbers into newly allocated values */
break;
default :
- (void) process_xcoff_symbol (cs, objfile);
+ process_xcoff_symbol (cs, objfile);
break;
}