From 1daa5dd836cc86ffce0f483df7f5ddbea30034cd Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 12 Oct 1994 16:44:14 +0000 Subject: [PATCH] Cast pointer arguments to bzero and bcopy to char *. From-SVN: r8262 --- gcc/cp/call.c | 6 +++--- gcc/cp/class.c | 10 +++++----- gcc/cp/pt.c | 6 +++--- gcc/cp/search.c | 2 +- gcc/cp/spew.c | 6 ++++-- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 7373acafd61..606f5eb0a41 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -718,7 +718,7 @@ compute_conversion_costs (function, tta_in, cp, arglen) cp->h.code = 0; cp->h.distance = 0; cp->h.int_penalty = 0; - bzero (cp->harshness, + bzero ((char *) cp->harshness, (cp->h_len + 1) * sizeof (struct harshness_code)); while (ttf && tta) @@ -2059,7 +2059,7 @@ build_method_call (instance, name, parms, basetype_path, flags) candidates = (struct candidate *) alloca ((ever_seen+1) * sizeof (struct candidate)); - bzero (candidates, (ever_seen + 1) * sizeof (struct candidate)); + bzero ((char *) candidates, (ever_seen + 1) * sizeof (struct candidate)); cp = candidates; len = list_length (parms); ever_seen = 0; @@ -2775,7 +2775,7 @@ build_overload_call_real (fnname, parms, flags, final_cp, buildxxx) { candidates = (struct candidate *)alloca ((length+1) * sizeof (struct candidate)); - bzero (candidates, (length + 1) * sizeof (struct candidate)); + bzero ((char *) candidates, (length + 1) * sizeof (struct candidate)); } cp = candidates; diff --git a/gcc/cp/class.c b/gcc/cp/class.c index e463d841e20..c16b6f20158 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -942,7 +942,7 @@ add_method (type, fields, method) * sizeof (char *) + len * sizeof (tree)); tmp_vec = (tree) obstack_base (ob); - bcopy (method_vec, tmp_vec, + bcopy ((char *) method_vec, (char *) tmp_vec, (sizeof (struct tree_common) + tree_code_length[(int) TREE_VEC] * sizeof (char *) + (len-1) * sizeof (tree))); @@ -1338,7 +1338,7 @@ finish_base_struct (t, b, t_binfo) tree binfos = BINFO_BASETYPES (t_binfo); int i, n_baseclasses = binfos ? TREE_VEC_LENGTH (binfos) : 0; int first_vfn_base_index = -1; - bzero (b, sizeof (struct base_info)); + bzero ((char *) b, sizeof (struct base_info)); for (i = 0; i < n_baseclasses; i++) { @@ -1680,8 +1680,8 @@ finish_struct_bits (t, max_has_virtual) tree *tmp; int i; - bzero (first_conversions, sizeof (first_conversions)); - bzero (last_conversions, sizeof (last_conversions)); + bzero ((char *) first_conversions, sizeof (first_conversions)); + bzero ((char *) last_conversions, sizeof (last_conversions)); for (tmp = &TREE_VEC_ELT (method_vec, 1); tmp != TREE_VEC_END (method_vec); tmp += 1) { @@ -2057,7 +2057,7 @@ duplicate_tag_error (t) int interface_only = CLASSTYPE_INTERFACE_ONLY (t); int interface_unknown = CLASSTYPE_INTERFACE_UNKNOWN (t); - bzero (TYPE_LANG_SPECIFIC (t), sizeof (struct lang_type)); + bzero ((char *) TYPE_LANG_SPECIFIC (t), sizeof (struct lang_type)); BINFO_BASETYPES(binfo) = NULL_TREE; CLASSTYPE_AS_LIST (t) = as_list; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 830a6b963ae..e3c3f0da080 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1481,7 +1481,7 @@ tsubst (t, args, nargs, in_decl) { int len = TREE_VEC_LENGTH (t), need_new = 0, i; tree *elts = (tree *) alloca (len * sizeof (tree)); - bzero (elts, len * sizeof (tree)); + bzero ((char *) elts, len * sizeof (tree)); for (i = 0; i < len; i++) { @@ -1930,7 +1930,7 @@ reinit_parse_for_template (yychar, d1, d2) if (!template_info) { template_info = (struct template_info *) permalloc (sizeof (struct template_info)); - bzero (template_info, sizeof (struct template_info)); + bzero ((char *) template_info, sizeof (struct template_info)); DECL_TEMPLATE_INFO (d2) = template_info; } template_info->filename = input_filename; @@ -1980,7 +1980,7 @@ type_unification (tparms, targs, parms, args, nsubsts, subr) my_friendly_assert (ntparms > 0, 292); if (!subr) - bzero (targs, sizeof (tree) * ntparms); + bzero ((char *) targs, sizeof (tree) * ntparms); while (parms && parms != void_list_node diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 6623ab4214a..967b00a4b66 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -236,7 +236,7 @@ my_new_memoized_entry (chain) struct memoized_entry *p = (struct memoized_entry *)obstack_alloc (&type_obstack_entries, sizeof (struct memoized_entry)); - bzero (p, sizeof (struct memoized_entry)); + bzero ((char *) p, sizeof (struct memoized_entry)); MEMOIZED_CHAIN (p) = chain; MEMOIZED_UID (p) = ++my_memoized_entry_counter; return p; diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c index ea00ba273b3..c28e2c15b1e 100644 --- a/gcc/cp/spew.c +++ b/gcc/cp/spew.c @@ -202,8 +202,10 @@ shift_tokens (n) * sizeof (struct token)); /* This move does not rely on the system being able to handle overlapping moves. */ - bcopy (nth_token (0), tmp, old_token_count * sizeof (struct token)); - bcopy (tmp, nth_token (n), old_token_count * sizeof (struct token)); + bcopy ((char *) nth_token (0), tmp, + old_token_count * sizeof (struct token)); + bcopy (tmp, (char *) nth_token (n), + old_token_count * sizeof (struct token)); } first_token = 0; }