* 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.
This commit is contained in:
Fred Fish 1992-07-04 03:22:08 +00:00
parent 4c7c6bab1f
commit 4ed3a9ea66
35 changed files with 208 additions and 205 deletions

View file

@ -1,3 +1,17 @@
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) 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. * dbxread.c (process_one_symbol): Ignore N_MAIN, N_ENDM for Solaris.

View file

@ -391,8 +391,8 @@ read_memory_nobpt (memaddr, myaddr, len)
bptlen -= (membpt + bptlen) - (memaddr + len); bptlen -= (membpt + bptlen) - (memaddr + len);
} }
(void) memcpy (myaddr + membpt - memaddr, memcpy (myaddr + membpt - memaddr,
b->shadow_contents + bptoffset, bptlen); b->shadow_contents + bptoffset, bptlen);
if (membpt > memaddr) if (membpt > memaddr)
{ {
@ -577,7 +577,7 @@ bpstat_copy (bs)
for (; bs != NULL; bs = bs->next) for (; bs != NULL; bs = bs->next)
{ {
tmp = (bpstat) xmalloc (sizeof (*tmp)); tmp = (bpstat) xmalloc (sizeof (*tmp));
(void) memcpy (tmp, bs, sizeof (*tmp)); memcpy (tmp, bs, sizeof (*tmp));
if (p == NULL) if (p == NULL)
/* This is the first thing in the chain. */ /* This is the first thing in the chain. */
retval = tmp; retval = tmp;
@ -1209,7 +1209,7 @@ set_raw_breakpoint (sal)
register struct breakpoint *b, *b1; register struct breakpoint *b, *b1;
b = (struct breakpoint *) xmalloc (sizeof (struct breakpoint)); b = (struct breakpoint *) xmalloc (sizeof (struct breakpoint));
(void) memset (b, 0, sizeof (*b)); memset (b, 0, sizeof (*b));
b->address = sal.pc; b->address = sal.pc;
b->symtab = sal.symtab; b->symtab = sal.symtab;
b->line_number = sal.line; b->line_number = sal.line;
@ -1802,7 +1802,7 @@ get_catch_sals (this_level_only)
bl = blockvector_for_pc (BLOCK_END (block) - 4, &index); bl = blockvector_for_pc (BLOCK_END (block) - 4, &index);
blocks_searched = (char *) alloca (BLOCKVECTOR_NBLOCKS (bl) * sizeof (char)); 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) while (block != 0)
{ {
@ -2250,7 +2250,7 @@ breakpoint_re_set ()
ALL_BREAKPOINTS_SAFE (b, temp) ALL_BREAKPOINTS_SAFE (b, temp)
{ {
sprintf (message, message1, b->number); /* Format possible error msg */ 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"); create_longjmp_breakpoint("longjmp");

View file

@ -220,7 +220,7 @@ dbx_lookup_type (typenums)
type_vector = (struct type **) type_vector = (struct type **)
xrealloc ((char *) type_vector, xrealloc ((char *) type_vector,
(type_vector_length * sizeof (struct type *))); (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 *)); (type_vector_length - old_len) * sizeof (struct type *));
} }
return &type_vector[index]; return &type_vector[index];
@ -243,7 +243,7 @@ dbx_lookup_type (typenums)
f->length *= 2; f->length *= 2;
f->vector = (struct type **) f->vector = (struct type **)
xrealloc ((char *) f->vector, f->length * sizeof (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 *)); (f->length - f_orig_length) * sizeof (struct type *));
} }
return &f->vector[index]; return &f->vector[index];
@ -968,7 +968,7 @@ void
buildsym_new_init () buildsym_new_init ()
{ {
/* Empty the hash table of global syms looking for values. */ /* 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 (); buildsym_init ();
} }
@ -2842,7 +2842,7 @@ read_array_type (pp, type, objfile)
/* Create range type. */ /* Create range type. */
range_type = (struct type *) range_type = (struct type *)
obstack_alloc (&objfile -> type_obstack, sizeof (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_OBJFILE (range_type) = objfile;
TYPE_CODE (range_type) = TYPE_CODE_RANGE; TYPE_CODE (range_type) = TYPE_CODE_RANGE;
TYPE_TARGET_TYPE (range_type) = index_type; TYPE_TARGET_TYPE (range_type) = index_type;
@ -2922,7 +2922,7 @@ read_enum_type (pp, type, objfile)
n = read_number (pp, ','); n = read_number (pp, ',');
sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack, sizeof (struct symbol)); 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_NAME (sym) = name;
SYMBOL_CLASS (sym) = LOC_CONST; SYMBOL_CLASS (sym) = LOC_CONST;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
@ -3282,7 +3282,7 @@ read_range_type (pp, typenums, objfile)
result_type = (struct type *) result_type = (struct type *)
obstack_alloc (&objfile -> type_obstack, obstack_alloc (&objfile -> type_obstack,
sizeof (struct type)); sizeof (struct type));
(void) memset (result_type, 0, sizeof (struct type)); memset (result_type, 0, sizeof (struct type));
TYPE_OBJFILE (result_type) = objfile; TYPE_OBJFILE (result_type) = objfile;
TYPE_LENGTH (result_type) = nbits / TARGET_CHAR_BIT; TYPE_LENGTH (result_type) = nbits / TARGET_CHAR_BIT;
TYPE_CODE (result_type) = TYPE_CODE_INT; TYPE_CODE (result_type) = TYPE_CODE_INT;
@ -3394,7 +3394,7 @@ read_range_type (pp, typenums, objfile)
result_type = (struct type *) result_type = (struct type *)
obstack_alloc (&objfile -> type_obstack, sizeof (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_OBJFILE (result_type) = objfile;
TYPE_CODE (result_type) = TYPE_CODE_RANGE; TYPE_CODE (result_type) = TYPE_CODE_RANGE;
@ -3409,7 +3409,7 @@ read_range_type (pp, typenums, objfile)
TYPE_FIELDS (result_type) = TYPE_FIELDS (result_type) =
(struct field *) obstack_alloc (&objfile -> type_obstack, (struct field *) obstack_alloc (&objfile -> type_obstack,
2 * sizeof (struct field)); 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, 0) = n2;
TYPE_FIELD_BITPOS (result_type, 1) = n3; TYPE_FIELD_BITPOS (result_type, 1) = n3;
@ -3497,7 +3497,7 @@ read_args (pp, end, objfile)
else if (TYPE_CODE (types[n-1]) != TYPE_CODE_VOID) else if (TYPE_CODE (types[n-1]) != TYPE_CODE_VOID)
{ {
rval = (struct type **) xmalloc ((n + 1) * sizeof (struct type *)); 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 else
{ {

View file

@ -1221,7 +1221,7 @@ yylex ()
{ {
char *err_copy = (char *) alloca (p - tokstart + 1); 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; err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy); error ("Invalid number \"%s\".", err_copy);
} }

View file

@ -324,7 +324,7 @@ coff_lookup_type (index)
type_vector = (struct type **) type_vector = (struct type **)
xrealloc ((char *) type_vector, xrealloc ((char *) type_vector,
type_vector_length * sizeof (struct type *)); 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 *)); (type_vector_length - old_vector_length) * sizeof(struct type *));
} }
return &type_vector[index]; return &type_vector[index];
@ -918,14 +918,14 @@ read_coff_symtab (symtab_offset, nsyms, objfile)
nlist_stream_global = stream; nlist_stream_global = stream;
nlist_nsyms_global = nsyms; nlist_nsyms_global = nsyms;
last_source_file = 0; 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 */ if (type_vector) /* Get rid of previous one */
free ((PTR)type_vector); free ((PTR)type_vector);
type_vector_length = 160; type_vector_length = 160;
type_vector = (struct type **) type_vector = (struct type **)
xmalloc (type_vector_length * sizeof (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 (); coff_start_symtab ();
@ -1057,7 +1057,7 @@ read_coff_symtab (symtab_offset, nsyms, objfile)
break; break;
} }
} }
(void) process_coff_symbol (cs, &main_aux, objfile); process_coff_symbol (cs, &main_aux, objfile);
break; break;
case C_FCN: case C_FCN:
@ -1164,7 +1164,7 @@ read_coff_symtab (symtab_offset, nsyms, objfile)
break; break;
default: default:
(void) process_coff_symbol (cs, &main_aux, objfile); process_coff_symbol (cs, &main_aux, objfile);
break; break;
} }
} }
@ -1318,7 +1318,7 @@ init_stringtab (chan, offset)
if (stringtab == NULL) if (stringtab == NULL)
return -1; return -1;
(void) memcpy (stringtab, &length, sizeof length); memcpy (stringtab, &length, sizeof length);
if (length == sizeof length) /* Empty table -- just the count */ if (length == sizeof length) /* Empty table -- just the count */
return 0; return 0;
@ -1425,7 +1425,7 @@ init_lineno (chan, offset, size)
return -1; return -1;
/* Terminate it with an all-zero sentinel record */ /* 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. */ make_cleanup (free, linetab); /* Be sure it gets de-allocated. */
return 0; return 0;
@ -1484,7 +1484,7 @@ patch_type (type, real_type)
TYPE_FIELDS (target) = (struct field *) TYPE_FIELDS (target) = (struct field *)
obstack_alloc (&current_objfile -> type_obstack, field_size); obstack_alloc (&current_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)) if (TYPE_NAME (real_target))
{ {
@ -1575,7 +1575,7 @@ process_coff_symbol (cs, aux, objfile)
#endif #endif
struct type *temptype; struct type *temptype;
(void) memset (sym, 0, sizeof (struct symbol)); memset (sym, 0, sizeof (struct symbol));
name = cs->c_name; name = cs->c_name;
name = (name[0] == '_' ? name + offset : name); name = (name[0] == '_' ? name + offset : name);
SYMBOL_NAME (sym) = obstack_copy0 (&objfile->symbol_obstack, name, strlen (name)); SYMBOL_NAME (sym) = obstack_copy0 (&objfile->symbol_obstack, name, strlen (name));
@ -1594,7 +1594,7 @@ process_coff_symbol (cs, aux, objfile)
struct type *new = (struct type *) struct type *new = (struct type *)
obstack_alloc (&objfile->symbol_obstack, sizeof (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)); sizeof(struct type));
SYMBOL_TYPE (sym) = new; SYMBOL_TYPE (sym) = new;
in_function_type = SYMBOL_TYPE(sym); in_function_type = SYMBOL_TYPE(sym);
@ -1792,7 +1792,7 @@ decode_type (cs, c_type, aux)
type = (struct type *) type = (struct type *)
obstack_alloc (&current_objfile -> type_obstack, obstack_alloc (&current_objfile -> type_obstack,
sizeof (struct type)); sizeof (struct type));
(void) memset (type, 0, sizeof (struct type)); memset (type, 0, sizeof (struct type));
TYPE_OBJFILE (type) = current_objfile; TYPE_OBJFILE (type) = current_objfile;
base_type = decode_type (cs, new_c_type, aux); base_type = decode_type (cs, new_c_type, aux);
@ -2103,7 +2103,7 @@ coff_read_enum_type (index, length, lastsym)
{ {
case C_MOE: case C_MOE:
sym = (struct symbol *) xmalloc (sizeof (struct symbol)); 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_NAME (sym) = savestring (name, strlen (name));
SYMBOL_CLASS (sym) = LOC_CONST; SYMBOL_CLASS (sym) = LOC_CONST;

View file

@ -235,7 +235,7 @@ add_show_from_set (setcmd, list)
struct cmd_list_element *showcmd = struct cmd_list_element *showcmd =
(struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element)); (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); delete_cmd (showcmd->name, list);
showcmd->type = show_cmd; showcmd->type = show_cmd;

View file

@ -180,7 +180,7 @@ core_open (filename, from_tty)
/* Add symbols and section mappings for any shared libraries */ /* Add symbols and section mappings for any shared libraries */
#ifdef SOLIB_ADD #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 #endif
/* Now, set up the frame cache, and print the top of stack */ /* Now, set up the frame cache, and print the top of stack */

View file

@ -343,7 +343,7 @@ cplus_demangle (mangled, options)
if ((mangled != NULL) && (*mangled != '\0')) if ((mangled != NULL) && (*mangled != '\0'))
{ {
(void) memset ((char *) work, 0, sizeof (work)); memset ((char *) work, 0, sizeof (work));
work -> options = options; work -> options = options;
string_init (&decl); string_init (&decl);

View file

@ -424,7 +424,7 @@ add_new_header_file (name, instance)
header_files[i].length = 10; header_files[i].length = 10;
header_files[i].vector header_files[i].vector
= (struct type **) xmalloc (10 * sizeof (struct type *)); = (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); add_this_object_header_file (i);
} }
@ -1813,7 +1813,7 @@ process_one_symbol (type, desc, valu, name, offset, objfile)
} }
break; /* Ignore repeated SOs */ break; /* Ignore repeated SOs */
} }
(void) end_symtab (valu, 0, 0, objfile); end_symtab (valu, 0, 0, objfile);
} }
start_symtab (name, NULL, valu); start_symtab (name, NULL, valu);
break; break;
@ -1872,7 +1872,7 @@ process_one_symbol (type, desc, valu, name, offset, objfile)
int i; int i;
struct symbol *sym = struct symbol *sym =
(struct symbol *) xmmalloc (objfile -> md, sizeof (struct symbol)); (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_NAME (sym) = savestring (name, strlen (name));
SYMBOL_CLASS (sym) = LOC_BLOCK; SYMBOL_CLASS (sym) = LOC_BLOCK;
SYMBOL_NAMESPACE (sym) = (enum namespace)((long) SYMBOL_NAMESPACE (sym) = (enum namespace)((long)

View file

@ -596,7 +596,7 @@ read_lexical_block_scope (dip, thisdie, enddie, objfile)
{ {
register struct context_stack *new; 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); process_dies (thisdie + dip -> die_length, enddie, objfile);
new = pop_context (); new = pop_context ();
if (local_symbols != NULL) if (local_symbols != NULL)
@ -694,7 +694,7 @@ alloc_utype (die_ref, utypep)
utypep = (struct type *) utypep = (struct type *)
obstack_alloc (&current_objfile -> type_obstack, obstack_alloc (&current_objfile -> type_obstack,
sizeof (struct type)); sizeof (struct type));
(void) memset (utypep, 0, sizeof (struct type)); memset (utypep, 0, sizeof (struct type));
TYPE_OBJFILE (utypep) = current_objfile; TYPE_OBJFILE (utypep) = current_objfile;
} }
*typep = utypep; *typep = utypep;
@ -1112,7 +1112,7 @@ decode_subscr_data (scan, end)
typep = (struct type *) typep = (struct type *)
obstack_alloc (&current_objfile -> type_obstack, obstack_alloc (&current_objfile -> type_obstack,
sizeof (struct type)); sizeof (struct type));
(void) memset (typep, 0, sizeof (struct type)); memset (typep, 0, sizeof (struct type));
TYPE_OBJFILE (typep) = current_objfile; TYPE_OBJFILE (typep) = current_objfile;
TYPE_CODE (typep) = TYPE_CODE_ARRAY; TYPE_CODE (typep) = TYPE_CODE_ARRAY;
TYPE_LENGTH (typep) = TYPE_LENGTH (nexttype); TYPE_LENGTH (typep) = TYPE_LENGTH (nexttype);
@ -1191,7 +1191,7 @@ dwarf_read_array_type (dip)
{ {
if ((utype = lookup_utype (dip -> die_ref)) == NULL) if ((utype = lookup_utype (dip -> die_ref)) == NULL)
{ {
(void) alloc_utype (dip -> die_ref, type); alloc_utype (dip -> die_ref, type);
} }
else else
{ {
@ -1230,7 +1230,7 @@ read_tag_pointer_type (dip)
if ((utype = lookup_utype (dip -> die_ref)) == NULL) if ((utype = lookup_utype (dip -> die_ref)) == NULL)
{ {
utype = lookup_pointer_type (type); utype = lookup_pointer_type (type);
(void) alloc_utype (dip -> die_ref, utype); alloc_utype (dip -> die_ref, utype);
} }
else else
{ {
@ -1294,7 +1294,7 @@ read_subroutine_type (dip, thisdie, enddie)
/* This is the first reference to one of these types. Make /* This is the first reference to one of these types. Make
a new one and place it in the user defined types. */ a new one and place it in the user defined types. */
ftype = lookup_function_type (type); ftype = lookup_function_type (type);
(void) alloc_utype (dip -> die_ref, ftype); alloc_utype (dip -> die_ref, ftype);
} }
else else
{ {
@ -1449,7 +1449,7 @@ enum_type (dip, objfile)
/* Handcraft a new symbol for this enum member. */ /* Handcraft a new symbol for this enum member. */
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack, sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol)); sizeof (struct symbol));
(void) memset (sym, 0, sizeof (struct symbol)); memset (sym, 0, sizeof (struct symbol));
SYMBOL_NAME (sym) = create_name (list -> field.name, SYMBOL_NAME (sym) = create_name (list -> field.name,
&objfile->symbol_obstack); &objfile->symbol_obstack);
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
@ -1576,7 +1576,7 @@ read_file_scope (dip, thisdie, enddie, objfile)
numutypes = (enddie - thisdie) / 4; numutypes = (enddie - thisdie) / 4;
utypes = (struct type **) xmalloc (numutypes * sizeof (struct type *)); utypes = (struct type **) xmalloc (numutypes * sizeof (struct type *));
back_to = make_cleanup (free, utypes); 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); start_symtab (dip -> at_name, NULL, dip -> at_low_pc);
decode_line_numbers (lnbase); decode_line_numbers (lnbase);
process_dies (thisdie + dip -> die_length, enddie, objfile); process_dies (thisdie + dip -> die_length, enddie, objfile);
@ -1679,7 +1679,7 @@ process_dies (thisdie, enddie, objfile)
read_tag_pointer_type (&di); read_tag_pointer_type (&di);
break; break;
default: default:
(void) new_symbol (&di, objfile); new_symbol (&di, objfile);
break; break;
} }
} }
@ -2516,7 +2516,7 @@ new_symbol (dip, objfile)
{ {
sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack, sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack,
sizeof (struct symbol)); 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); SYMBOL_NAME (sym) = create_name (dip -> at_name, &objfile->symbol_obstack);
/* default assumptions */ /* default assumptions */
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
@ -2974,7 +2974,7 @@ create_name (name, obstackp)
length = strlen (name) + 1; length = strlen (name) + 1;
newname = (char *) obstack_alloc (obstackp, length); newname = (char *) obstack_alloc (obstackp, length);
(void) strcpy (newname, name); strcpy (newname, name);
return (newname); return (newname);
} }
@ -3033,7 +3033,7 @@ basicdieinfo (dip, diep, objfile)
struct objfile *objfile; struct objfile *objfile;
{ {
curdie = dip; curdie = dip;
(void) memset (dip, 0, sizeof (struct dieinfo)); memset (dip, 0, sizeof (struct dieinfo));
dip -> die = diep; dip -> die = diep;
dip -> die_ref = dbroff + (diep - dbbase); dip -> die_ref = dbroff + (diep - dbbase);
dip -> die_length = target_to_host (diep, SIZEOF_DIE_LENGTH, GET_UNSIGNED, dip -> die_length = target_to_host (diep, SIZEOF_DIE_LENGTH, GET_UNSIGNED,

View file

@ -350,7 +350,7 @@ elf_symfile_read (objfile, addr, mainline)
/* Now process debugging information, which is contained in /* Now process debugging information, which is contained in
special ELF sections. We first have to find them... */ 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); bfd_map_over_sections (abfd, elf_locate_sections, (PTR) &ei);
if (ei.dboffset && ei.lnoffset) if (ei.dboffset && ei.lnoffset)
{ {

View file

@ -52,7 +52,7 @@ alloc_type (objfile)
type = (struct type *) obstack_alloc (&objfile -> type_obstack, type = (struct type *) obstack_alloc (&objfile -> type_obstack,
sizeof (struct type)); 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. */ /* Initialize the fields that might not be zero. */
@ -362,7 +362,7 @@ smash_to_member_type (type, domain, to_type)
objfile = TYPE_OBJFILE (type); objfile = TYPE_OBJFILE (type);
(void) memset ((char *)type, 0, sizeof (struct type)); memset ((char *)type, 0, sizeof (struct type));
TYPE_OBJFILE (type) = objfile; TYPE_OBJFILE (type) = objfile;
TYPE_TARGET_TYPE (type) = to_type; TYPE_TARGET_TYPE (type) = to_type;
TYPE_DOMAIN_TYPE (type) = domain; TYPE_DOMAIN_TYPE (type) = domain;
@ -388,7 +388,7 @@ smash_to_method_type (type, domain, to_type, args)
objfile = TYPE_OBJFILE (type); objfile = TYPE_OBJFILE (type);
(void) memset ((char *)type, 0, sizeof (struct type)); memset ((char *)type, 0, sizeof (struct type));
TYPE_OBJFILE (type) = objfile; TYPE_OBJFILE (type) = objfile;
TYPE_TARGET_TYPE (type) = to_type; TYPE_TARGET_TYPE (type) = to_type;
TYPE_DOMAIN_TYPE (type) = domain; TYPE_DOMAIN_TYPE (type) = domain;
@ -930,7 +930,7 @@ lookup_fundamental_type (objfile, typeid)
nbytes = FT_NUM_MEMBERS * sizeof (struct type *); nbytes = FT_NUM_MEMBERS * sizeof (struct type *);
objfile -> fundamental_types = (struct type **) objfile -> fundamental_types = (struct type **)
obstack_alloc (&objfile -> type_obstack, nbytes); 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; typep = objfile -> fundamental_types + typeid;
if ((type = *typep) == NULL) if ((type = *typep) == NULL)

View file

@ -251,7 +251,7 @@ vtophys(space, addr)
} }
#ifdef MACHKERNELDEBUG #ifdef MACHKERNELDEBUG
else if (kerneltype == OS_MACH) { else if (kerneltype == OS_MACH) {
(void) mach_vtophys(space, addr, &phys); mach_vtophys(space, addr, &phys);
} }
#endif #endif
#if 0 #if 0
@ -439,7 +439,7 @@ setup_kernel_debugging()
panicstr = kvread(ksym_lookup("panicstr")); panicstr = kvread(ksym_lookup("panicstr"));
if (panicstr == ~0) if (panicstr == ~0)
return; 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++) for (cp = buf; cp < &buf[sizeof(buf)] && *cp; cp++)
if (!isascii(*cp) || (!isprint(*cp) && !isspace(*cp))) if (!isascii(*cp) || (!isprint(*cp) && !isspace(*cp)))
*cp = '?'; *cp = '?';

View file

@ -251,7 +251,7 @@ vtophys(space, addr)
} }
#ifdef MACHKERNELDEBUG #ifdef MACHKERNELDEBUG
else if (kerneltype == OS_MACH) { else if (kerneltype == OS_MACH) {
(void) mach_vtophys(space, addr, &phys); mach_vtophys(space, addr, &phys);
} }
#endif #endif
#if 0 #if 0
@ -439,7 +439,7 @@ setup_kernel_debugging()
panicstr = kvread(ksym_lookup("panicstr")); panicstr = kvread(ksym_lookup("panicstr"));
if (panicstr == ~0) if (panicstr == ~0)
return; 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++) for (cp = buf; cp < &buf[sizeof(buf)] && *cp; cp++)
if (!isascii(*cp) || (!isprint(*cp) && !isspace(*cp))) if (!isascii(*cp) || (!isprint(*cp) && !isspace(*cp)))
*cp = '?'; *cp = '?';

View file

@ -77,7 +77,7 @@ double_to_ieee_extended (ext_format, from, to)
unsigned long mant0, mant1, exponent; unsigned long mant0, mant1, exponent;
unsigned char tobytes[8]; unsigned char tobytes[8];
(void) memset (to, 0, TOTALSIZE); memset (to, 0, TOTALSIZE);
if (dfrom == 0) if (dfrom == 0)
return; /* Result is zero */ return; /* Result is zero */
if (dfrom != dfrom) { if (dfrom != dfrom) {

View file

@ -528,7 +528,7 @@ The expression which contained the function call has been discarded.");
/* On return, the stack dummy has been popped already. */ /* On return, the stack dummy has been popped already. */
(void) memcpy (buffer, stop_registers, sizeof stop_registers); memcpy (buffer, stop_registers, sizeof stop_registers);
} }
/* Proceed until we reach a different source line with pc greater than /* Proceed until we reach a different source line with pc greater than

View file

@ -987,7 +987,7 @@ yylex ()
{ {
char *err_copy = (char *) alloca (p - tokstart + 1); 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; err_copy[p - tokstart] = 0;
error ("Invalid number \"%s\".", err_copy); error ("Invalid number \"%s\".", err_copy);
} }

View file

@ -386,7 +386,7 @@ xzalloc(size)
{ {
PTR p = xmalloc (size); PTR p = xmalloc (size);
(void) memset (p, 0, size); memset (p, 0, size);
return p; return p;
} }
@ -1280,7 +1280,7 @@ data: /* Common code for symbols describing data */
is the displacement from the procedure`s start is the displacement from the procedure`s start
address of the end of this block. */ address of the end of this block. */
BLOCK_END(top_stack->cur_block) = sh->value + top_stack->procadr; 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); } else complain (&stEnd_complaint, (char *)sh->sc);
pop_parse_stack(); /* restore previous lexical context */ pop_parse_stack(); /* restore previous lexical context */

View file

@ -95,7 +95,7 @@ allocate_objfile (abfd, mapped)
if (((mapto = map_to_address ()) == 0) || if (((mapto = map_to_address ()) == 0) ||
((md = mmalloc_attach (fd, (void *) mapto)) == NULL)) ((md = mmalloc_attach (fd, (void *) mapto)) == NULL))
{ {
(void) close (fd); close (fd);
} }
else if ((objfile = (struct objfile *) mmalloc_getkey (md, 0)) != NULL) else if ((objfile = (struct objfile *) mmalloc_getkey (md, 0)) != NULL)
{ {
@ -121,7 +121,7 @@ allocate_objfile (abfd, mapped)
the first malloc. See comments in init_malloc() and mmcheck(). */ the first malloc. See comments in init_malloc() and mmcheck(). */
init_malloc (md); init_malloc (md);
objfile = (struct objfile *) xmmalloc (md, sizeof (struct objfile)); 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 -> md = md;
objfile -> mmfd = fd; objfile -> mmfd = fd;
objfile -> flags |= OBJF_MAPPED; objfile -> flags |= OBJF_MAPPED;
@ -166,7 +166,7 @@ allocate_objfile (abfd, mapped)
if (objfile == NULL) if (objfile == NULL)
{ {
objfile = (struct objfile *) xmalloc (sizeof (struct objfile)); objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
(void) memset (objfile, 0, sizeof (struct objfile)); memset (objfile, 0, sizeof (struct objfile));
objfile -> md = NULL; objfile -> md = NULL;
obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, xmalloc, free, obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, xmalloc, free,
(void *) 0, 0); (void *) 0, 0);
@ -302,7 +302,7 @@ free_objfile (objfile)
mmfd = objfile -> mmfd; mmfd = objfile -> mmfd;
mmalloc_detach (objfile -> md); mmalloc_detach (objfile -> md);
objfile = NULL; objfile = NULL;
(void) close (mmfd); close (mmfd);
} }
#endif /* !defined(NO_MMALLOC) && defined(HAVE_MMAP) */ #endif /* !defined(NO_MMALLOC) && defined(HAVE_MMAP) */

View file

@ -219,7 +219,7 @@ write_exp_string (str)
xrealloc ((char *) expout, (sizeof (struct expression) xrealloc ((char *) expout, (sizeof (struct expression)
+ (expout_size * sizeof (union exp_element)))); + (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; ((char *) &expout->elts[expout_ptr - lenelt])[len] = 0;
write_exp_elt_longcst ((LONGEST) len); write_exp_elt_longcst ((LONGEST) len);
} }
@ -231,7 +231,7 @@ char *
copy_name (token) copy_name (token)
struct stoken token; struct stoken token;
{ {
(void) memcpy (namecopy, token.ptr, token.length); memcpy (namecopy, token.ptr, token.length);
namecopy[token.length] = 0; namecopy[token.length] = 0;
return namecopy; return namecopy;
} }
@ -251,7 +251,7 @@ prefixify_expression (expr)
temp = (struct expression *) alloca (len); temp = (struct expression *) alloca (len);
/* Copy the original expression into temp. */ /* Copy the original expression into temp. */
(void) memcpy (temp, expr, len); memcpy (temp, expr, len);
prefixify_subexp (temp, expr, inpos, outpos); prefixify_subexp (temp, expr, inpos, outpos);
} }
@ -481,7 +481,7 @@ prefixify_subexp (inexpr, outexpr, inend, outbeg)
/* Copy the final operator itself, from the end of the input /* Copy the final operator itself, from the end of the input
to the beginning of the output. */ to the beginning of the output. */
inend -= oplen; inend -= oplen;
(void) memcpy (&outexpr->elts[outbeg], &inexpr->elts[inend], memcpy (&outexpr->elts[outbeg], &inexpr->elts[inend],
oplen * sizeof (union exp_element)); oplen * sizeof (union exp_element));
outbeg += oplen; outbeg += oplen;

View file

@ -514,7 +514,7 @@ lookupname (transp, val, prefix)
free (locbuf); free (locbuf);
} }
locbuf = xmalloc (strlen (prefix) + 16); locbuf = xmalloc (strlen (prefix) + 16);
(void) sprintf (locbuf, "%s %u", prefix, val); sprintf (locbuf, "%s %u", prefix, val);
name = locbuf; name = locbuf;
} }
return (name); return (name);
@ -539,7 +539,7 @@ sigcodename (sip)
} }
if (name == NULL) if (name == NULL)
{ {
(void) sprintf (locbuf, "sigcode %u", sip -> si_signo); sprintf (locbuf, "sigcode %u", sip -> si_signo);
name = locbuf; name = locbuf;
} }
return (name); return (name);
@ -597,7 +597,7 @@ syscallname (syscallnum)
} }
else else
{ {
(void) sprintf (locbuf, "syscall %u", syscallnum); sprintf (locbuf, "syscall %u", syscallnum);
rtnval = locbuf; rtnval = locbuf;
} }
return (rtnval); return (rtnval);
@ -1123,7 +1123,7 @@ unconditionally_kill_inferior ()
int signo; int signo;
signo = SIGKILL; signo = SIGKILL;
(void) ioctl (pi.fd, PIOCKILL, &signo); ioctl (pi.fd, PIOCKILL, &signo);
close_proc_file (&pi); close_proc_file (&pi);
wait ((int *) 0); wait ((int *) 0);
} }
@ -1228,10 +1228,10 @@ store_inferior_registers (regno)
{ {
if (regno != -1) if (regno != -1)
{ {
(void) ioctl (pi.fd, PIOCGREG, &pi.gregset); ioctl (pi.fd, PIOCGREG, &pi.gregset);
} }
fill_gregset (&pi.gregset, regno); fill_gregset (&pi.gregset, regno);
(void) ioctl (pi.fd, PIOCSREG, &pi.gregset); ioctl (pi.fd, PIOCSREG, &pi.gregset);
#if defined (FP0_REGNUM) #if defined (FP0_REGNUM)
@ -1241,10 +1241,10 @@ store_inferior_registers (regno)
if (regno != -1) if (regno != -1)
{ {
(void) ioctl (pi.fd, PIOCGFPREG, &pi.fpregset); ioctl (pi.fd, PIOCGFPREG, &pi.fpregset);
} }
fill_fpregset (&pi.fpregset, regno); fill_fpregset (&pi.fpregset, regno);
(void) ioctl (pi.fd, PIOCSFPREG, &pi.fpregset); ioctl (pi.fd, PIOCSFPREG, &pi.fpregset);
#endif /* FP0_REGNUM */ #endif /* FP0_REGNUM */
@ -1285,7 +1285,7 @@ inferior_proc_init (pid)
} }
else else
{ {
(void) memset ((char *) &pi.prrun, 0, sizeof (pi.prrun)); memset ((char *) &pi.prrun, 0, sizeof (pi.prrun));
prfillset (&pi.prrun.pr_trace); prfillset (&pi.prrun.pr_trace);
proc_signal_handling_change (); proc_signal_handling_change ();
prfillset (&pi.prrun.pr_fault); prfillset (&pi.prrun.pr_fault);
@ -1391,7 +1391,7 @@ proc_set_exec_trap ()
auto char procname[32]; auto char procname[32];
int fd; int fd;
(void) sprintf (procname, PROC_NAME_FMT, getpid ()); sprintf (procname, PROC_NAME_FMT, getpid ());
if ((fd = open (procname, O_RDWR)) < 0) if ((fd = open (procname, O_RDWR)) < 0)
{ {
perror (procname); perror (procname);
@ -1429,11 +1429,11 @@ proc_set_exec_trap ()
{ {
long pr_flags; long pr_flags;
pr_flags = PR_FORK; pr_flags = PR_FORK;
(void) ioctl (fd, PIOCRESET, &pr_flags); ioctl (fd, PIOCRESET, &pr_flags);
} }
#else #else
#if defined (PIOCRFORK) /* Original method */ #if defined (PIOCRFORK) /* Original method */
(void) ioctl (fd, PIOCRFORK, NULL); ioctl (fd, PIOCRFORK, NULL);
#endif #endif
#endif #endif
} }
@ -1651,15 +1651,15 @@ attach (pid)
/* Remember some things about the inferior that we will, or might, change /* Remember some things about the inferior that we will, or might, change
so that we can restore them when we detach. */ so that we can restore them when we detach. */
(void) ioctl (pi.fd, PIOCGTRACE, &pi.saved_trace); ioctl (pi.fd, PIOCGTRACE, &pi.saved_trace);
(void) ioctl (pi.fd, PIOCGHOLD, &pi.saved_sighold); ioctl (pi.fd, PIOCGHOLD, &pi.saved_sighold);
(void) ioctl (pi.fd, PIOCGFAULT, &pi.saved_fltset); ioctl (pi.fd, PIOCGFAULT, &pi.saved_fltset);
(void) ioctl (pi.fd, PIOCGENTRY, &pi.saved_entryset); ioctl (pi.fd, PIOCGENTRY, &pi.saved_entryset);
(void) ioctl (pi.fd, PIOCGEXIT, &pi.saved_exitset); ioctl (pi.fd, PIOCGEXIT, &pi.saved_exitset);
/* Set up trace and fault sets, as gdb expects them. */ /* 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); prfillset (&pi.prrun.pr_trace);
proc_signal_handling_change (); proc_signal_handling_change ();
prfillset (&pi.prrun.pr_fault); prfillset (&pi.prrun.pr_fault);
@ -1750,7 +1750,7 @@ detach (signal)
if (signal || !pi.was_stopped || if (signal || !pi.was_stopped ||
query ("Was stopped when attached, make it runnable again? ")) 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; pi.prrun.pr_flags = PRCFAULT;
if (ioctl (pi.fd, PIOCRUN, &pi.prrun)) if (ioctl (pi.fd, PIOCRUN, &pi.prrun))
{ {
@ -1980,7 +1980,7 @@ set_proc_siginfo (pip, signo)
} }
else else
{ {
(void) memset ((char *) &newsiginfo, 0, sizeof (newsiginfo)); memset ((char *) &newsiginfo, 0, sizeof (newsiginfo));
sip = &newsiginfo; sip = &newsiginfo;
sip -> si_signo = signo; sip -> si_signo = signo;
sip -> si_code = 0; sip -> si_code = 0;
@ -2144,8 +2144,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
} }
else else
{ {
(void) memcpy ((char *) &pi.gregset, core_reg_sect, memcpy ((char *) &pi.gregset, core_reg_sect, sizeof (pi.gregset));
sizeof (pi.gregset));
supply_gregset (&pi.gregset); supply_gregset (&pi.gregset);
} }
} }
@ -2157,8 +2156,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
} }
else else
{ {
(void) memcpy ((char *) &pi.fpregset, core_reg_sect, memcpy ((char *) &pi.fpregset, core_reg_sect, sizeof (pi.fpregset));
sizeof (pi.fpregset));
#if defined (FP0_REGNUM) #if defined (FP0_REGNUM)
supply_fpregset (&pi.fpregset); supply_fpregset (&pi.fpregset);
#endif #endif
@ -2189,7 +2187,7 @@ proc_init_failed (why)
char *why; char *why;
{ {
print_sys_errmsg (pi.pathname, errno); print_sys_errmsg (pi.pathname, errno);
(void) kill (pi.pid, SIGKILL); kill (pi.pid, SIGKILL);
close_proc_file (&pi); close_proc_file (&pi);
error (why); error (why);
/* NOTREACHED */ /* NOTREACHED */
@ -2221,7 +2219,7 @@ close_proc_file (pip)
pip -> pid = 0; pip -> pid = 0;
if (pip -> valid) if (pip -> valid)
{ {
(void) close (pip -> fd); close (pip -> fd);
} }
pip -> fd = -1; pip -> fd = -1;
if (pip -> pathname) if (pip -> pathname)
@ -2263,7 +2261,7 @@ open_proc_file (pid, pip)
pip -> valid = 0; pip -> valid = 0;
if (pip -> valid) if (pip -> valid)
{ {
(void) close (pip -> fd); close (pip -> fd);
} }
if (pip -> pathname == NULL) if (pip -> pathname == NULL)
{ {
@ -2844,7 +2842,7 @@ info_proc (args, from_tty)
{ {
pid = pii.pid; pid = pii.pid;
pip = &pii; pip = &pii;
(void) memset (&pii, 0, sizeof (pii)); memset (&pii, 0, sizeof (pii));
if (!open_proc_file (pid, pip)) if (!open_proc_file (pid, pip))
{ {
perror_with_name (pip -> pathname); perror_with_name (pip -> pathname);

View file

@ -100,7 +100,7 @@ putenv( entry )
if ( new_environ == (char **) NULL ) if ( new_environ == (char **) NULL )
return( -1 ); 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] = entry;
new_environ[size+1] = NULL; new_environ[size+1] = NULL;

View file

@ -1084,7 +1084,7 @@ int from_tty;
/* You may need to do an init_target_mm() */ /* You may need to do an init_target_mm() */
/* init_target_mm(?,?,?,?,?,?,?,?); */ /* init_target_mm(?,?,?,?,?,?,?,?); */
immediate_quit--; 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 #endif
} }

View file

@ -712,7 +712,7 @@ vx_load_command (arg_string, from_tty)
immediate_quit--; immediate_quit--;
/* FIXME, for now we ignore data_addr and bss_addr. */ /* 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 */ #ifdef FIXME /* Not ready for prime time */
@ -1036,7 +1036,7 @@ add_symbol_stub (arg)
struct ldfile *pLoadFile = (struct ldfile *)arg; struct ldfile *pLoadFile = (struct ldfile *)arg;
printf("\t%s: ", pLoadFile->name); 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"); printf ("ok\n");
return 1; return 1;
} }

View file

@ -76,7 +76,8 @@ fetch_inferior_registers (regno)
perror("ptrace_getregs"); perror("ptrace_getregs");
registers[REGISTER_BYTE (0)] = 0; registers[REGISTER_BYTE (0)] = 0;
(void) memcpy (&registers[REGISTER_BYTE (1)], &inferior_registers.r_g1, 15 * REGISTER_RAW_SIZE (G0_REGNUM)); memcpy (&registers[REGISTER_BYTE (1)], &inferior_registers.r_g1,
15 * REGISTER_RAW_SIZE (G0_REGNUM));
*(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps; *(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
*(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc; *(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
*(int *)&registers[REGISTER_BYTE (NPC_REGNUM)] = inferior_registers.r_npc; *(int *)&registers[REGISTER_BYTE (NPC_REGNUM)] = inferior_registers.r_npc;
@ -103,9 +104,8 @@ fetch_inferior_registers (regno)
(PTRACE_ARG3_TYPE) &inferior_fp_registers, (PTRACE_ARG3_TYPE) &inferior_fp_registers,
0)) 0))
perror("ptrace_getfpregs"); perror("ptrace_getfpregs");
(void) memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
&inferior_fp_registers, sizeof inferior_fp_registers.fpu_fr);
sizeof inferior_fp_registers.fpu_fr);
/* bcopy (&inferior_fp_registers.Fpu_fsr, /* bcopy (&inferior_fp_registers.Fpu_fsr,
&registers[REGISTER_BYTE (FPS_REGNUM)], &registers[REGISTER_BYTE (FPS_REGNUM)],
sizeof (FPU_FSR_TYPE)); FIXME??? -- gnu@cyg */ sizeof (FPU_FSR_TYPE)); FIXME??? -- gnu@cyg */
@ -210,9 +210,8 @@ store_inferior_registers (regno)
{ {
if (!register_valid[G1_REGNUM]) abort(); if (!register_valid[G1_REGNUM]) abort();
(void) memcpy (&inferior_registers.r_g1, memcpy (&inferior_registers.r_g1, &registers[REGISTER_BYTE (G1_REGNUM)],
&registers[REGISTER_BYTE (G1_REGNUM)], 15 * REGISTER_RAW_SIZE (G1_REGNUM));
15 * REGISTER_RAW_SIZE (G1_REGNUM));
inferior_registers.r_ps = inferior_registers.r_ps =
*(int *)&registers[REGISTER_BYTE (PS_REGNUM)]; *(int *)&registers[REGISTER_BYTE (PS_REGNUM)];
@ -231,13 +230,11 @@ store_inferior_registers (regno)
if (wanna_store & FP_REGS) if (wanna_store & FP_REGS)
{ {
if (!register_valid[FP0_REGNUM+9]) abort(); if (!register_valid[FP0_REGNUM+9]) abort();
(void) memcpy (&inferior_fp_registers, memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
&registers[REGISTER_BYTE (FP0_REGNUM)], sizeof inferior_fp_registers.fpu_fr);
sizeof inferior_fp_registers.fpu_fr);
/* (void) memcpy (&inferior_fp_registers.Fpu_fsr, /* memcpy (&inferior_fp_registers.Fpu_fsr,
&registers[REGISTER_BYTE (FPS_REGNUM)], &registers[REGISTER_BYTE (FPS_REGNUM)], sizeof (FPU_FSR_TYPE));
sizeof (FPU_FSR_TYPE));
****/ ****/
if (0 != if (0 !=
ptrace (PTRACE_SETFPREGS, inferior_pid, ptrace (PTRACE_SETFPREGS, inferior_pid,
@ -263,9 +260,8 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
*(int *)&registers[REGISTER_BYTE (0)] = 0; *(int *)&registers[REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */ /* The globals and output registers. */
(void) memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
&gregs->r_g1, 15 * REGISTER_RAW_SIZE (G1_REGNUM));
15 * REGISTER_RAW_SIZE (G1_REGNUM));
*(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps; *(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
*(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc; *(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
*(int *)&registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc; *(int *)&registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
@ -295,12 +291,10 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
#define fpuregs ((struct fpu *) core_reg_sect) #define fpuregs ((struct fpu *) core_reg_sect)
if (core_reg_size >= sizeof (struct fpu)) if (core_reg_size >= sizeof (struct fpu))
{ {
(void) memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], fpuregs->fpu_regs,
fpuregs->fpu_regs, sizeof (fpuregs->fpu_regs));
sizeof (fpuregs->fpu_regs)); memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)], &fpuregs->fpu_fsr,
(void) memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)], sizeof (FPU_FSR_TYPE));
&fpuregs->fpu_fsr,
sizeof (FPU_FSR_TYPE));
} }
else else
fprintf (stderr, "Couldn't read float regs from core file\n"); fprintf (stderr, "Couldn't read float regs from core file\n");

View file

@ -70,7 +70,7 @@ symfile_bfd_open PARAMS ((char *));
static void static void
find_sym_fns PARAMS ((struct objfile *)); find_sym_fns PARAMS ((struct objfile *));
static void void
clear_symtab_users_once PARAMS ((void)); clear_symtab_users_once PARAMS ((void));
/* List of all available sym_fns. On gdb startup, each object file reader /* List of all available sym_fns. On gdb startup, each object file reader
@ -545,7 +545,7 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow)
psymtab != NULL; psymtab != NULL;
psymtab = psymtab -> next) psymtab = psymtab -> next)
{ {
(void) psymtab_to_symtab (psymtab); psymtab_to_symtab (psymtab);
} }
} }
@ -625,8 +625,7 @@ symbol_file_command (args, from_tty)
/* Getting new symbols may change our opinion about what is /* Getting new symbols may change our opinion about what is
frameless. */ frameless. */
reinit_frame_cache (); reinit_frame_cache ();
(void) symbol_file_add (name, from_tty, (CORE_ADDR)0, 1, symbol_file_add (name, from_tty, (CORE_ADDR)0, 1, mapped, readnow);
mapped, readnow);
} }
do_cleanups (cleanups); do_cleanups (cleanups);
} }
@ -804,7 +803,7 @@ add_symbol_file_command (args, from_tty)
reinit_frame_cache (); reinit_frame_cache ();
(void) symbol_file_add (name, 0, text_addr, 0, mapped, readnow); symbol_file_add (name, 0, text_addr, 0, mapped, readnow);
} }
/* Re-read symbols if a symbol-file has changed. */ /* Re-read symbols if a symbol-file has changed. */
@ -992,7 +991,7 @@ allocate_symtab (filename, objfile)
symtab = (struct symtab *) symtab = (struct symtab *)
obstack_alloc (&objfile -> symbol_obstack, sizeof (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), symtab -> filename = obsavestring (filename, strlen (filename),
&objfile -> symbol_obstack); &objfile -> symbol_obstack);
symtab -> fullname = NULL; symtab -> fullname = NULL;
@ -1028,7 +1027,7 @@ allocate_psymtab (filename, objfile)
obstack_alloc (&objfile -> psymbol_obstack, obstack_alloc (&objfile -> psymbol_obstack,
sizeof (struct partial_symtab)); 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), psymtab -> filename = obsavestring (filename, strlen (filename),
&objfile -> psymbol_obstack); &objfile -> psymbol_obstack);
psymtab -> symtab = NULL; psymtab -> symtab = NULL;
@ -1071,7 +1070,7 @@ allocate_psymtab (filename, objfile)
static int clear_symtab_users_queued; static int clear_symtab_users_queued;
static int clear_symtab_users_done; static int clear_symtab_users_done;
static void void
clear_symtab_users_once () clear_symtab_users_once ()
{ {
/* Enforce once-per-`do_cleanups'-semantics */ /* Enforce once-per-`do_cleanups'-semantics */

View file

@ -1494,7 +1494,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
p1 = p; p1 = p;
while (p != *argptr && p[-1] == ' ') --p; while (p != *argptr && p[-1] == ' ') --p;
copy = (char *) alloca (p - *argptr + 1); copy = (char *) alloca (p - *argptr + 1);
(void) memcpy (copy, *argptr, p - *argptr); memcpy (copy, *argptr, p - *argptr);
copy[p - *argptr] = 0; copy[p - *argptr] = 0;
/* Discard the class name from the arg. */ /* Discard the class name from the arg. */
@ -1535,7 +1535,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
else else
{ {
copy = (char *) alloca (p - *argptr + 1 + (q1 - q)); copy = (char *) alloca (p - *argptr + 1 + (q1 - q));
(void) memcpy (copy, *argptr, p - *argptr); memcpy (copy, *argptr, p - *argptr);
copy[p - *argptr] = '\0'; copy[p - *argptr] = '\0';
} }
@ -1630,7 +1630,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
p1 = p; p1 = p;
while (p != *argptr && p[-1] == ' ') --p; while (p != *argptr && p[-1] == ' ') --p;
copy = (char *) alloca (p - *argptr + 1); copy = (char *) alloca (p - *argptr + 1);
(void) memcpy (copy, *argptr, p - *argptr); memcpy (copy, *argptr, p - *argptr);
copy[p - *argptr] = 0; copy[p - *argptr] = 0;
/* Find that file's data. */ /* Find that file's data. */
@ -1717,7 +1717,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
p = skip_quoted (*argptr); p = skip_quoted (*argptr);
copy = (char *) alloca (p - *argptr + 1); copy = (char *) alloca (p - *argptr + 1);
(void) memcpy (copy, *argptr, p - *argptr); memcpy (copy, *argptr, p - *argptr);
copy[p - *argptr] = '\0'; copy[p - *argptr] = '\0';
if ((copy[0] == copy [p - *argptr - 1]) if ((copy[0] == copy [p - *argptr - 1])
&& strchr (gdb_completer_quote_characters, copy[0]) != NULL) && strchr (gdb_completer_quote_characters, copy[0]) != NULL)
@ -1784,7 +1784,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
values.sals = (struct symtab_and_line *) values.sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line)); xmalloc (sizeof (struct symtab_and_line));
values.nelts = 1; 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].symtab = sym_symtab;
values.sals[0].line = SYMBOL_LINE (sym); values.sals[0].line = SYMBOL_LINE (sym);
return values; return values;
@ -1899,8 +1899,8 @@ decode_line_2 (sym_arr, nelts, funfirstline)
error ("cancelled"); error ("cancelled");
else if (num == 1) else if (num == 1)
{ {
(void) memcpy (return_values.sals, values.sals, memcpy (return_values.sals, values.sals,
(nelts * sizeof(struct symtab_and_line))); (nelts * sizeof(struct symtab_and_line)));
return_values.nelts = nelts; return_values.nelts = nelts;
return return_values; return return_values;
} }
@ -2159,7 +2159,7 @@ list_symbols (regexp, class, bpt)
|| (class == 2 && SYMBOL_CLASS (psym) == LOC_TYPEDEF) || (class == 2 && SYMBOL_CLASS (psym) == LOC_TYPEDEF)
|| (class == 3 && SYMBOL_CLASS (psym) == LOC_BLOCK))) || (class == 3 && SYMBOL_CLASS (psym) == LOC_BLOCK)))
{ {
(void) PSYMTAB_TO_SYMTAB(ps); PSYMTAB_TO_SYMTAB(ps);
keep_going = 0; keep_going = 0;
} }
} }

View file

@ -35,7 +35,7 @@ extern struct objfile *current_objfile;
#define B_TST(a,x) ((a)[(x)>>3] & (1 << ((x)&7))) #define B_TST(a,x) ((a)[(x)>>3] & (1 << ((x)&7)))
#define B_TYPE unsigned char #define B_TYPE unsigned char
#define B_BYTES(x) ( 1 + ((x)>>3) ) #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 /* Define a simple structure used to hold some very basic information about

View file

@ -180,13 +180,13 @@ i386_skip_prologue PARAMS ((int));
to virtual format for register REGNUM. */ to virtual format for register REGNUM. */
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \ #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 /* Convert data from virtual format for register REGNUM
to raw format for register REGNUM. */ to raw format for register REGNUM. */
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \ #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 /* Return the GDB type object for the "standard" data type
of data in register N. */ of data in register N. */
@ -208,7 +208,7 @@ i386_skip_prologue PARAMS ((int));
into VALBUF. */ into VALBUF. */
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,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 /* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */ of type TYPE, given in virtual format. */

View file

@ -222,13 +222,13 @@ extern CORE_ADDR sparc_pc_adjust();
to virtual format for register REGNUM. */ to virtual format for register REGNUM. */
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \ #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 /* Convert data from virtual format for register REGNUM
to raw format for register REGNUM. */ to raw format for register REGNUM. */
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \ #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 /* Return the GDB type object for the "standard" data type
of data in register N. */ of data in register N. */
@ -256,15 +256,13 @@ extern CORE_ADDR sparc_pc_adjust();
{ \ { \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \ { \
(void) memcpy ((VALBUF), \ memcpy ((VALBUF), ((int *)(REGBUF))+FP0_REGNUM, TYPE_LENGTH(TYPE));\
((int *)(REGBUF))+FP0_REGNUM, \
TYPE_LENGTH(TYPE)); \
} \ } \
else \ else \
(void) memcpy ((VALBUF), \ memcpy ((VALBUF), \
(char *)(REGBUF) + 4 * 8 + \ (char *)(REGBUF) + 4 * 8 + \
(TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \ (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
TYPE_LENGTH(TYPE)); \ TYPE_LENGTH(TYPE)); \
} }
/* Write into appropriate registers a function return value /* Write into appropriate registers a function return value

View file

@ -508,7 +508,7 @@ init_malloc (md)
warning ("internal error: failed to install memory consistency checks"); warning ("internal error: failed to install memory consistency checks");
} }
(void) mmtrace (); mmtrace ();
} }
#endif /* Have mmalloc and want corruption checking */ #endif /* Have mmalloc and want corruption checking */
@ -634,7 +634,7 @@ savestring (ptr, size)
int size; int size;
{ {
register char *p = (char *) xmalloc (size + 1); register char *p = (char *) xmalloc (size + 1);
(void) memcpy (p, ptr, size); memcpy (p, ptr, size);
p[size] = 0; p[size] = 0;
return p; return p;
} }
@ -646,7 +646,7 @@ msavestring (md, ptr, size)
int size; int size;
{ {
register char *p = (char *) xmmalloc (md, size + 1); register char *p = (char *) xmmalloc (md, size + 1);
(void) memcpy (p, ptr, size); memcpy (p, ptr, size);
p[size] = 0; p[size] = 0;
return p; return p;
} }
@ -1205,7 +1205,7 @@ vfprintf_filtered (stream, format, args)
/* This won't blow up if the restrictions described above are /* This won't blow up if the restrictions described above are
followed. */ followed. */
(void) vsprintf (linebuffer, format, args); vsprintf (linebuffer, format, args);
fputs_filtered (linebuffer, stream); fputs_filtered (linebuffer, stream);
} }

View file

@ -130,7 +130,7 @@ value_zero (type, lv)
{ {
register value val = allocate_value (type); 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; VALUE_LVAL (val) = lv;
return val; return val;
@ -333,10 +333,10 @@ value_assign (toval, fromval)
(int) value_as_long (fromval), (int) value_as_long (fromval),
VALUE_BITPOS (toval), VALUE_BITSIZE (toval)); VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
else if (use_buffer) else if (use_buffer)
(void) memcpy (buffer + byte_offset, raw_buffer, use_buffer); memcpy (buffer + byte_offset, raw_buffer, use_buffer);
else else
(void) memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval), memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
TYPE_LENGTH (type)); TYPE_LENGTH (type));
/* Copy it back. */ /* Copy it back. */
for ((regno = VALUE_FRAME_REGNUM (toval) + reg_offset, for ((regno = VALUE_FRAME_REGNUM (toval) + reg_offset,
@ -379,9 +379,9 @@ value_assign (toval, fromval)
} }
val = allocate_value (type); val = allocate_value (type);
(void) memcpy (val, toval, VALUE_CONTENTS_RAW (val) - (char *) val); memcpy (val, toval, VALUE_CONTENTS_RAW (val) - (char *) val);
(void) memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval), memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),
TYPE_LENGTH (type)); TYPE_LENGTH (type));
VALUE_TYPE (val) = type; VALUE_TYPE (val) = type;
return val; return val;
@ -742,7 +742,7 @@ call_function_by_hand (function, nargs, args)
/* Create a call sequence customized for this function /* Create a call sequence customized for this function
and the number of arguments for it. */ 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++) for (i = 0; i < sizeof dummy / sizeof (REGISTER_TYPE); i++)
SWAP_TARGET_AND_HOST (&dummy1[i], sizeof (REGISTER_TYPE)); SWAP_TARGET_AND_HOST (&dummy1[i], sizeof (REGISTER_TYPE));
FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args, FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,

View file

@ -236,7 +236,7 @@ print_floating (valaddr, type, stream)
if (len == sizeof (float)) if (len == sizeof (float))
{ {
/* It's single precision. */ /* It's single precision. */
(void) memcpy ((char *) &low, valaddr, sizeof (low)); memcpy ((char *) &low, valaddr, sizeof (low));
/* target -> host. */ /* target -> host. */
SWAP_TARGET_AND_HOST (&low, sizeof (float)); SWAP_TARGET_AND_HOST (&low, sizeof (float));
nonnegative = low >= 0; nonnegative = low >= 0;
@ -250,19 +250,19 @@ print_floating (valaddr, type, stream)
/* It's double precision. Get the high and low words. */ /* It's double precision. Get the high and low words. */
#if TARGET_BYTE_ORDER == BIG_ENDIAN #if TARGET_BYTE_ORDER == BIG_ENDIAN
(void) memcpy (&low, valaddr+4, sizeof (low)); memcpy (&low, valaddr+4, sizeof (low));
(void) memcpy (&high, valaddr+0, sizeof (high)); memcpy (&high, valaddr+0, sizeof (high));
#else #else
(void) memcpy (&low, valaddr+0, sizeof (low)); memcpy (&low, valaddr+0, sizeof (low));
(void) memcpy (&high, valaddr+4, sizeof (high)); memcpy (&high, valaddr+4, sizeof (high));
#endif #endif
SWAP_TARGET_AND_HOST (&low, sizeof (low)); SWAP_TARGET_AND_HOST (&low, sizeof (low));
SWAP_TARGET_AND_HOST (&high, sizeof (high)); SWAP_TARGET_AND_HOST (&high, sizeof (high));
nonnegative = high >= 0; nonnegative = high >= 0;
is_nan = (((high >> 20) & 0x7ff) == 0x7ff is_nan = (((high >> 20) & 0x7ff) == 0x7ff
&& ! ((((high & 0xfffff) == 0)) && (low == 0))); && ! ((((high & 0xfffff) == 0)) && (low == 0)));
high &= 0xfffff; high &= 0xfffff;
} }
if (is_nan) if (is_nan)
{ {

View file

@ -233,10 +233,11 @@ record_latest_value (val)
/* Check error now if about to store an invalid float. We return -1 /* 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". */ to the caller, but allow them to continue, e.g. to print it as "Nan". */
if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FLT) { 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 */ 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 /* Here we treat value_history_count as origin-zero
and applying to the value being stored now. */ and applying to the value being stored now. */
@ -247,7 +248,7 @@ record_latest_value (val)
register struct value_history_chunk *new register struct value_history_chunk *new
= (struct value_history_chunk *) = (struct value_history_chunk *)
xmalloc (sizeof (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; new->next = value_history_chain;
value_history_chain = new; value_history_chain = new;
} }
@ -437,8 +438,7 @@ set_internalvar_component (var, offset, bitpos, bitsize, newval)
modify_field (addr, (int) value_as_long (newval), modify_field (addr, (int) value_as_long (newval),
bitpos, bitsize); bitpos, bitsize);
else else
(void) memcpy (addr, VALUE_CONTENTS (newval), memcpy (addr, VALUE_CONTENTS (newval), TYPE_LENGTH (VALUE_TYPE (newval)));
TYPE_LENGTH (VALUE_TYPE (newval)));
} }
void void
@ -587,7 +587,7 @@ unpack_long (type, valaddr)
if (len == sizeof (float)) if (len == sizeof (float))
{ {
float retval; float retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -595,7 +595,7 @@ unpack_long (type, valaddr)
if (len == sizeof (double)) if (len == sizeof (double))
{ {
double retval; double retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -616,7 +616,7 @@ unpack_long (type, valaddr)
if (len == sizeof (short)) if (len == sizeof (short))
{ {
unsigned short retval; unsigned short retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -624,7 +624,7 @@ unpack_long (type, valaddr)
if (len == sizeof (int)) if (len == sizeof (int))
{ {
unsigned int retval; unsigned int retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -632,7 +632,7 @@ unpack_long (type, valaddr)
if (len == sizeof (long)) if (len == sizeof (long))
{ {
unsigned long retval; unsigned long retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -640,7 +640,7 @@ unpack_long (type, valaddr)
if (len == sizeof (long long)) if (len == sizeof (long long))
{ {
unsigned long long retval; unsigned long long retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -655,7 +655,7 @@ unpack_long (type, valaddr)
if (len == sizeof (char)) if (len == sizeof (char))
{ {
SIGNED char retval; /* plain chars might be unsigned on host */ 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)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -663,7 +663,7 @@ unpack_long (type, valaddr)
if (len == sizeof (short)) if (len == sizeof (short))
{ {
short retval; short retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -671,7 +671,7 @@ unpack_long (type, valaddr)
if (len == sizeof (int)) if (len == sizeof (int))
{ {
int retval; int retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -679,7 +679,7 @@ unpack_long (type, valaddr)
if (len == sizeof (long)) if (len == sizeof (long))
{ {
long retval; long retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -688,7 +688,7 @@ unpack_long (type, valaddr)
if (len == sizeof (long long)) if (len == sizeof (long long))
{ {
long long retval; long long retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -706,14 +706,14 @@ unpack_long (type, valaddr)
if (len == sizeof(long)) if (len == sizeof(long))
{ {
unsigned long retval; unsigned long retval;
(void) memcpy (&retval, valaddr, sizeof(retval)); memcpy (&retval, valaddr, sizeof(retval));
SWAP_TARGET_AND_HOST (&retval, sizeof(retval)); SWAP_TARGET_AND_HOST (&retval, sizeof(retval));
return retval; return retval;
} }
else if (len == sizeof(short)) else if (len == sizeof(short))
{ {
unsigned short retval; unsigned short retval;
(void) memcpy (&retval, valaddr, len); memcpy (&retval, valaddr, len);
SWAP_TARGET_AND_HOST (&retval, len); SWAP_TARGET_AND_HOST (&retval, len);
return retval; return retval;
} }
@ -755,7 +755,7 @@ unpack_double (type, valaddr, invp)
if (len == sizeof (float)) if (len == sizeof (float))
{ {
float retval; float retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -763,7 +763,7 @@ unpack_double (type, valaddr, invp)
if (len == sizeof (double)) if (len == sizeof (double))
{ {
double retval; double retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -816,7 +816,7 @@ unpack_pointer (type, valaddr)
if (len == sizeof (CORE_ADDR)) if (len == sizeof (CORE_ADDR))
{ {
CORE_ADDR retval; CORE_ADDR retval;
(void) memcpy (&retval, valaddr, sizeof (retval)); memcpy (&retval, valaddr, sizeof (retval));
SWAP_TARGET_AND_HOST (&retval, sizeof (retval)); SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
return retval; return retval;
} }
@ -872,8 +872,8 @@ value_primitive_field (arg1, offset, fieldno, arg_type)
if (VALUE_LAZY (arg1)) if (VALUE_LAZY (arg1))
VALUE_LAZY (v) = 1; VALUE_LAZY (v) = 1;
else else
(void) memcpy (VALUE_CONTENTS_RAW (v), memcpy (VALUE_CONTENTS_RAW (v), VALUE_CONTENTS_RAW (arg1) + offset,
VALUE_CONTENTS_RAW (arg1) + offset, TYPE_LENGTH (type)); TYPE_LENGTH (type));
} }
VALUE_LVAL (v) = VALUE_LVAL (arg1); VALUE_LVAL (v) = VALUE_LVAL (arg1);
if (VALUE_LVAL (arg1) == lval_internalvar) if (VALUE_LVAL (arg1) == lval_internalvar)
@ -1031,7 +1031,7 @@ value_headof (arg, btype, dtype)
know that we aren't happy, but don't throw an error. know that we aren't happy, but don't throw an error.
FIXME: there has to be a better way to do this. */ FIXME: there has to be a better way to do this. */
struct type *error_type = (struct type *)xmalloc (sizeof (struct type)); 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 *")); TYPE_NAME (error_type) = savestring ("suspicious *", sizeof ("suspicious *"));
VALUE_TYPE (arg) = error_type; VALUE_TYPE (arg) = error_type;
return arg; return arg;
@ -1218,7 +1218,7 @@ unpack_field_as_long (type, valaddr, fieldno)
int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
int lsbcount; int lsbcount;
(void) memcpy (&val, valaddr + bitpos / 8, sizeof (val)); memcpy (&val, valaddr + bitpos / 8, sizeof (val));
SWAP_TARGET_AND_HOST (&val, sizeof (val)); SWAP_TARGET_AND_HOST (&val, sizeof (val));
/* Extract bits. See comment above. */ /* Extract bits. See comment above. */
@ -1267,7 +1267,7 @@ modify_field (addr, fieldval, bitpos, bitsize)
&& 0 != (fieldval & ~((1<<bitsize)-1))) && 0 != (fieldval & ~((1<<bitsize)-1)))
error ("Value %d does not fit in %d bits.", fieldval, bitsize); 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 */ SWAP_TARGET_AND_HOST (&oword, sizeof oword); /* To host format */
/* Shifting for bit field depends on endianness of the target machine. */ /* Shifting for bit field depends on endianness of the target machine. */
@ -1283,7 +1283,7 @@ modify_field (addr, fieldval, bitpos, bitsize)
oword |= fieldval << bitpos; oword |= fieldval << bitpos;
SWAP_TARGET_AND_HOST (&oword, sizeof oword); /* To target format */ SWAP_TARGET_AND_HOST (&oword, sizeof oword); /* To target format */
(void) memcpy (addr, &oword, sizeof oword); memcpy (addr, &oword, sizeof oword);
} }
/* Convert C numbers into newly allocated values */ /* Convert C numbers into newly allocated values */

View file

@ -1569,7 +1569,7 @@ function_entry_point:
break; break;
default : default :
(void) process_xcoff_symbol (cs, objfile); process_xcoff_symbol (cs, objfile);
break; break;
} }