diff options
author | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2003-01-10 03:13:50 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2003-01-10 03:13:50 +0000 |
commit | 7048110fe1fec412457a0618e87725d6f6e96bd6 (patch) | |
tree | 9762c1cc7a389ba5ce2774e08e447baed695549b /gcc/java | |
parent | 77d3109be28c227a324991307b0e2e46774b011c (diff) | |
download | gcc-7048110fe1fec412457a0618e87725d6f6e96bd6.zip gcc-7048110fe1fec412457a0618e87725d6f6e96bd6.tar.gz gcc-7048110fe1fec412457a0618e87725d6f6e96bd6.tar.bz2 |
decl.c, [...]: Don't cast return value of xmalloc et al.
* decl.c, parse-scan.y, parse.y: Don't cast return value of
xmalloc et al.
From-SVN: r61138
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/decl.c | 2 | ||||
-rw-r--r-- | gcc/java/parse-scan.y | 8 | ||||
-rw-r--r-- | gcc/java/parse.y | 12 |
3 files changed, 10 insertions, 12 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c index fa69066..b070300 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1583,7 +1583,7 @@ java_dup_lang_specific_decl (node) return; lang_decl_size = sizeof (struct lang_decl); - x = (struct lang_decl *) ggc_alloc (lang_decl_size); + x = ggc_alloc (lang_decl_size); memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size); DECL_LANG_SPECIFIC (node) = x; } diff --git a/gcc/java/parse-scan.y b/gcc/java/parse-scan.y index 2411b11..24e8055 100644 --- a/gcc/java/parse-scan.y +++ b/gcc/java/parse-scan.y @@ -109,8 +109,7 @@ struct method_declarator { }; #define NEW_METHOD_DECLARATOR(D,N,A) \ { \ - (D) = \ - (struct method_declarator *)xmalloc (sizeof (struct method_declarator)); \ + (D) = xmalloc (sizeof (struct method_declarator)); \ (D)->method_name = (N); \ (D)->args = (A); \ } @@ -1179,8 +1178,7 @@ constant_expression: void java_push_parser_context () { - struct parser_ctxt *new = - (struct parser_ctxt *) xcalloc (1, sizeof (struct parser_ctxt)); + struct parser_ctxt *new = xcalloc (1, sizeof (struct parser_ctxt)); new->next = ctxp; ctxp = new; @@ -1192,7 +1190,7 @@ push_class_context (name) { struct class_context *ctx; - ctx = (struct class_context *) xmalloc (sizeof (struct class_context)); + ctx = xmalloc (sizeof (struct class_context)); ctx->name = (char *) name; ctx->next = current_class_context; current_class_context = ctx; diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 65a1147..236525c 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -2183,10 +2183,10 @@ dims: { allocate *= sizeof (int); if (ctxp->osb_number) - ctxp->osb_number = (int *)xrealloc (ctxp->osb_number, - allocate); + ctxp->osb_number = xrealloc (ctxp->osb_number, + allocate); else - ctxp->osb_number = (int *)xmalloc (allocate); + ctxp->osb_number = xmalloc (allocate); } ctxp->osb_depth++; CURRENT_OSB (ctxp) = 1; @@ -2660,7 +2660,7 @@ create_new_parser_context (copy_from_previous) { struct parser_ctxt *new; - new = (struct parser_ctxt *) ggc_alloc (sizeof (struct parser_ctxt)); + new = ggc_alloc (sizeof (struct parser_ctxt)); if (copy_from_previous) { memcpy (new, ctxp, sizeof (struct parser_ctxt)); @@ -5133,7 +5133,7 @@ static void create_jdep_list (ctxp) struct parser_ctxt *ctxp; { - jdeplist *new = (jdeplist *)xmalloc (sizeof (jdeplist)); + jdeplist *new = xmalloc (sizeof (jdeplist)); new->first = new->last = NULL; new->next = ctxp->classd_list; ctxp->classd_list = new; @@ -5188,7 +5188,7 @@ register_incomplete_type (kind, wfl, decl, ptr) int kind; tree wfl, decl, ptr; { - jdep *new = (jdep *)xmalloc (sizeof (jdep)); + jdep *new = xmalloc (sizeof (jdep)); if (!ptr && kind != JDEP_METHOD_END) /* JDEP_METHOD_END is a mere marker */ ptr = obtain_incomplete_type (wfl); |