Commit cd531a2e by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * expr.c (build_java_soft_divmod): Provide a default case in switch.
        (java_lang_expand_expr): Mark parameters `target', `tmode' and
        `modifier' with ATTRIBUTE_UNUSED.

        * gjavah.c (process_file): Add braces around ambiguous `else'.

        * jcf-dump.c (print_access_flags, localvar_free): Change return
        type to void.

        * parse.y (java_complete_expand_method): Initialize variable
        `exception_copy'.
        (resolve_qualified_expression_name): Likewise for `field_decl'.
        (patch_method_invocation): Likewise for `class_to_search'.
        (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
        (patch_assignment): Likewise for `lhs_type'.

        * verify.c (verify_jvm_instructions): Remove unused variable
        `caller'.

From-SVN: r28344
parent 93b69d0f
1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (build_java_soft_divmod): Provide a default case in switch.
(java_lang_expand_expr): Mark parameters `target', `tmode' and
`modifier' with ATTRIBUTE_UNUSED.
* gjavah.c (process_file): Add braces around ambiguous `else'.
* jcf-dump.c (print_access_flags, localvar_free): Change return
type to void.
* parse.y (java_complete_expand_method): Initialize variable
`exception_copy'.
(resolve_qualified_expression_name): Likewise for `field_decl'.
(patch_method_invocation): Likewise for `class_to_search'.
(qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
(patch_assignment): Likewise for `lhs_type'.
* verify.c (verify_jvm_instructions): Remove unused variable
`caller'.
1999-07-25 Richard Henderson <rth@cygnus.com> 1999-07-25 Richard Henderson <rth@cygnus.com>
* decl.c (va_list_type_node): New. * decl.c (va_list_type_node): New.
......
...@@ -1072,6 +1072,8 @@ build_java_soft_divmod (op, type, op1, op2) ...@@ -1072,6 +1072,8 @@ build_java_soft_divmod (op, type, op1, op2)
case TRUNC_MOD_EXPR: case TRUNC_MOD_EXPR:
call = soft_irem_node; call = soft_irem_node;
break; break;
default:
break;
} }
} }
else if (type == long_type_node) else if (type == long_type_node)
...@@ -1084,6 +1086,8 @@ build_java_soft_divmod (op, type, op1, op2) ...@@ -1084,6 +1086,8 @@ build_java_soft_divmod (op, type, op1, op2)
case TRUNC_MOD_EXPR: case TRUNC_MOD_EXPR:
call = soft_lrem_node; call = soft_lrem_node;
break; break;
default:
break;
} }
} }
...@@ -1873,9 +1877,9 @@ case_identity (t, v) ...@@ -1873,9 +1877,9 @@ case_identity (t, v)
struct rtx_def * struct rtx_def *
java_lang_expand_expr (exp, target, tmode, modifier) java_lang_expand_expr (exp, target, tmode, modifier)
register tree exp; register tree exp;
rtx target; rtx target ATTRIBUTE_UNUSED;
enum machine_mode tmode; enum machine_mode tmode ATTRIBUTE_UNUSED;
enum expand_modifier modifier; enum expand_modifier modifier ATTRIBUTE_UNUSED;
{ {
tree current; tree current;
......
...@@ -1308,18 +1308,20 @@ DEFUN(process_file, (jcf, out), ...@@ -1308,18 +1308,20 @@ DEFUN(process_file, (jcf, out),
jcf_parse_class (jcf); jcf_parse_class (jcf);
if (written_class_count++ == 0 && out) if (written_class_count++ == 0 && out)
if (! stubs) {
fputs ("// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-\n\n", if (! stubs)
out); fputs ("// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-\n\n",
else out);
{ else
fputs ("// This file was created by `gcjh -stubs'. It is -*- c++ -*-. {
fputs ("// This file was created by `gcjh -stubs'. It is -*- c++ -*-.
// //
// This file is intended to give you a head start on implementing native // This file is intended to give you a head start on implementing native
// methods using CNI. // methods using CNI.
// Be aware: running `gcjh -stubs' once more for this class may overwrite any // Be aware: running `gcjh -stubs' once more for this class may overwrite any
// edits you have made to this file.\n\n", out); // edits you have made to this file.\n\n", out);
} }
}
if (out) if (out)
{ {
......
...@@ -78,7 +78,7 @@ int class_access_flags = 0; ...@@ -78,7 +78,7 @@ int class_access_flags = 0;
/* Print in format similar to javap. VERY IMCOMPLETE. */ /* Print in format similar to javap. VERY IMCOMPLETE. */
int flag_javap_compatible = 0; int flag_javap_compatible = 0;
static int print_access_flags PROTO ((FILE *, uint16, char)); static void print_access_flags PROTO ((FILE *, uint16, char));
static void print_constant_terse PROTO ((FILE*, JCF*, int, int)); static void print_constant_terse PROTO ((FILE*, JCF*, int, int));
static void print_constant PROTO ((FILE *, JCF *, int, int)); static void print_constant PROTO ((FILE *, JCF *, int, int));
static void print_constant_ref PROTO ((FILE *, JCF *, int)); static void print_constant_ref PROTO ((FILE *, JCF *, int));
...@@ -311,7 +311,7 @@ DEFUN(print_constant_ref, (stream, jcf, index), ...@@ -311,7 +311,7 @@ DEFUN(print_constant_ref, (stream, jcf, index),
The CONTEXT is one of 'c' (class flags), 'f' (field flags), The CONTEXT is one of 'c' (class flags), 'f' (field flags),
or 'm' (method flags). */ or 'm' (method flags). */
static int static void
DEFUN (print_access_flags, (stream, flags, context), DEFUN (print_access_flags, (stream, flags, context),
FILE *stream AND uint16 flags AND char context) FILE *stream AND uint16 flags AND char context)
{ {
......
...@@ -286,7 +286,7 @@ static void define_jcf_label PROTO ((struct jcf_block *, ...@@ -286,7 +286,7 @@ static void define_jcf_label PROTO ((struct jcf_block *,
static struct jcf_block * get_jcf_label_here PROTO ((struct jcf_partial *)); static struct jcf_block * get_jcf_label_here PROTO ((struct jcf_partial *));
static void put_linenumber PROTO ((int, struct jcf_partial *)); static void put_linenumber PROTO ((int, struct jcf_partial *));
static void localvar_alloc PROTO ((tree, struct jcf_partial *)); static void localvar_alloc PROTO ((tree, struct jcf_partial *));
static int localvar_free PROTO ((tree, struct jcf_partial *)); static void localvar_free PROTO ((tree, struct jcf_partial *));
static int get_access_flags PROTO ((tree)); static int get_access_flags PROTO ((tree));
static void write_chunks PROTO ((FILE *, struct chunk *)); static void write_chunks PROTO ((FILE *, struct chunk *));
static int adjust_typed_op PROTO ((tree, int)); static int adjust_typed_op PROTO ((tree, int));
...@@ -567,7 +567,7 @@ localvar_alloc (decl, state) ...@@ -567,7 +567,7 @@ localvar_alloc (decl, state)
} }
} }
static int static void
localvar_free (decl, state) localvar_free (decl, state)
tree decl; tree decl;
struct jcf_partial *state; struct jcf_partial *state;
......
...@@ -8503,7 +8503,7 @@ java_complete_expand_method (mdecl) ...@@ -8503,7 +8503,7 @@ java_complete_expand_method (mdecl)
{ {
tree fbody = DECL_FUNCTION_BODY (mdecl); tree fbody = DECL_FUNCTION_BODY (mdecl);
tree block_body = BLOCK_EXPR_BODY (fbody); tree block_body = BLOCK_EXPR_BODY (fbody);
tree exception_copy; tree exception_copy = NULL_TREE;
expand_start_java_method (mdecl); expand_start_java_method (mdecl);
build_result_decl (mdecl); build_result_decl (mdecl);
...@@ -9215,7 +9215,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) ...@@ -9215,7 +9215,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found)
/* We resolve and expression name */ /* We resolve and expression name */
else else
{ {
tree field_decl; tree field_decl = NULL_TREE;
/* If there exists an early resolution, use it. That occurs /* If there exists an early resolution, use it. That occurs
only once and we know that there are more things to only once and we know that there are more things to
...@@ -9628,7 +9628,7 @@ patch_method_invocation (patch, primary, where, is_static, ret_decl) ...@@ -9628,7 +9628,7 @@ patch_method_invocation (patch, primary, where, is_static, ret_decl)
constructors */ constructors */
else else
{ {
tree class_to_search; tree class_to_search = NULL_TREE;
int lc; /* Looking for Constructor */ int lc; /* Looking for Constructor */
/* We search constructor in their target class */ /* We search constructor in their target class */
...@@ -10207,7 +10207,8 @@ static void ...@@ -10207,7 +10207,8 @@ static void
qualify_ambiguous_name (id) qualify_ambiguous_name (id)
tree id; tree id;
{ {
tree qual, qual_wfl, name, decl, ptr_type, saved_current_class; tree qual, qual_wfl, name = NULL_TREE, decl, ptr_type = NULL_TREE,
saved_current_class;
int again, super_found = 0, this_found = 0, new_array_found = 0; int again, super_found = 0, this_found = 0, new_array_found = 0;
int code; int code;
...@@ -11429,7 +11430,7 @@ patch_assignment (node, wfl_op1, wfl_op2) ...@@ -11429,7 +11430,7 @@ patch_assignment (node, wfl_op1, wfl_op2)
{ {
tree rhs = TREE_OPERAND (node, 1); tree rhs = TREE_OPERAND (node, 1);
tree lvalue = TREE_OPERAND (node, 0), llvalue; tree lvalue = TREE_OPERAND (node, 0), llvalue;
tree lhs_type, rhs_type, new_rhs = NULL_TREE; tree lhs_type = NULL_TREE, rhs_type, new_rhs = NULL_TREE;
int error_found = 0; int error_found = 0;
int lvalue_from_array = 0; int lvalue_from_array = 0;
......
...@@ -5918,7 +5918,7 @@ java_complete_expand_method (mdecl) ...@@ -5918,7 +5918,7 @@ java_complete_expand_method (mdecl)
{ {
tree fbody = DECL_FUNCTION_BODY (mdecl); tree fbody = DECL_FUNCTION_BODY (mdecl);
tree block_body = BLOCK_EXPR_BODY (fbody); tree block_body = BLOCK_EXPR_BODY (fbody);
tree exception_copy; tree exception_copy = NULL_TREE;
expand_start_java_method (mdecl); expand_start_java_method (mdecl);
build_result_decl (mdecl); build_result_decl (mdecl);
...@@ -6630,7 +6630,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) ...@@ -6630,7 +6630,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found)
/* We resolve and expression name */ /* We resolve and expression name */
else else
{ {
tree field_decl; tree field_decl = NULL_TREE;
/* If there exists an early resolution, use it. That occurs /* If there exists an early resolution, use it. That occurs
only once and we know that there are more things to only once and we know that there are more things to
...@@ -7043,7 +7043,7 @@ patch_method_invocation (patch, primary, where, is_static, ret_decl) ...@@ -7043,7 +7043,7 @@ patch_method_invocation (patch, primary, where, is_static, ret_decl)
constructors */ constructors */
else else
{ {
tree class_to_search; tree class_to_search = NULL_TREE;
int lc; /* Looking for Constructor */ int lc; /* Looking for Constructor */
/* We search constructor in their target class */ /* We search constructor in their target class */
...@@ -7622,7 +7622,8 @@ static void ...@@ -7622,7 +7622,8 @@ static void
qualify_ambiguous_name (id) qualify_ambiguous_name (id)
tree id; tree id;
{ {
tree qual, qual_wfl, name, decl, ptr_type, saved_current_class; tree qual, qual_wfl, name = NULL_TREE, decl, ptr_type = NULL_TREE,
saved_current_class;
int again, super_found = 0, this_found = 0, new_array_found = 0; int again, super_found = 0, this_found = 0, new_array_found = 0;
int code; int code;
...@@ -8844,7 +8845,7 @@ patch_assignment (node, wfl_op1, wfl_op2) ...@@ -8844,7 +8845,7 @@ patch_assignment (node, wfl_op1, wfl_op2)
{ {
tree rhs = TREE_OPERAND (node, 1); tree rhs = TREE_OPERAND (node, 1);
tree lvalue = TREE_OPERAND (node, 0), llvalue; tree lvalue = TREE_OPERAND (node, 0), llvalue;
tree lhs_type, rhs_type, new_rhs = NULL_TREE; tree lhs_type = NULL_TREE, rhs_type, new_rhs = NULL_TREE;
int error_found = 0; int error_found = 0;
int lvalue_from_array = 0; int lvalue_from_array = 0;
......
...@@ -1213,7 +1213,6 @@ verify_jvm_instructions (jcf, byte_ops, length) ...@@ -1213,7 +1213,6 @@ verify_jvm_instructions (jcf, byte_ops, length)
else else
{ {
tree ret_map = LABEL_RETURN_TYPE_STATE (current_subr); tree ret_map = LABEL_RETURN_TYPE_STATE (current_subr);
tree caller = LABEL_SUBR_CONTEXT (current_subr);
int size = DECL_MAX_LOCALS(current_function_decl)+stack_pointer; int size = DECL_MAX_LOCALS(current_function_decl)+stack_pointer;
index = wide ? IMMEDIATE_u2 : IMMEDIATE_u1; index = wide ? IMMEDIATE_u2 : IMMEDIATE_u1;
wide = 0; wide = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment