Warning fixes:

* class.c (build_utf8_ref): Initialize variable `field'.
        * decl.c (init_decl_processing): Initialize variable `field'.
        * expr.c (build_known_method_ref): Mark parameters `method_type',
        `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
        (process_jvm_instruction): Likewise for parameter `length'.
        * jvspec.c (lang_specific_driver): Mark variables `saw_math',
        `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
        ATTRIBUTE_UNUSED.
        * parse.y (maybe_generate_clinit): Remove unused variable
        `has_non_primitive_fields'.
        (find_in_imports_on_demand): Initialize variables `node_to_use'
        and `cl'.
        (patch_binop): Likewise for variable `prom_type'.
        (patch_unaryop): Likewise for variable `prom_type'.
        * verify.c (verify_jvm_instructions): Likewise for variable `last'.
        * xref.c (xref_table): Add missing initializer.

From-SVN: r27030
This commit is contained in:
Kaveh R. Ghazi 1999-05-19 11:30:30 +00:00 committed by Kaveh Ghazi
parent c472cdfd0a
commit ab3a6dd6e2
9 changed files with 50 additions and 26 deletions

View File

@ -1,3 +1,28 @@
1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (build_utf8_ref): Initialize variable `field'.
* decl.c (init_decl_processing): Initialize variable `field'.
* expr.c (build_known_method_ref): Mark parameters `method_type',
`method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
(process_jvm_instruction): Likewise for parameter `length'.
* jvspec.c (lang_specific_driver): Mark variables `saw_math',
`saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
ATTRIBUTE_UNUSED.
* parse.y (maybe_generate_clinit): Remove unused variable
`has_non_primitive_fields'.
(find_in_imports_on_demand): Initialize variables `node_to_use'
and `cl'.
(patch_binop): Likewise for variable `prom_type'.
(patch_unaryop): Likewise for variable `prom_type'.
* verify.c (verify_jvm_instructions): Likewise for variable `last'.
* xref.c (xref_table): Add missing initializer.
1999-05-14 Tom Tromey <tromey@cygnus.com>
* java-except.h (struct eh_range): Removed unused `next' member.
@ -70,13 +95,13 @@ Thu May 13 13:23:38 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* xref.h (xref_get_data): New function, declared.
(XREF_GET_DATA): Use xref_get_data.
1999-05-13 Kaveh R. Ghazi <ghazi@snafu.rutgers.edu>
1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (print_include): Cast the result of `strlen' to int
when comparing against a signed value.
(add_namelet): Likewise.
1999-05-12 Kaveh R. Ghazi <ghazi@snafu.rutgers.edu>
1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (expand_invoke): Mark parameter `nargs' with
ATTRIBUTE_UNUSED.

View File

@ -559,7 +559,7 @@ build_utf8_ref (name)
int name_len = IDENTIFIER_LENGTH(name);
char buf[60];
char *buf_ptr;
tree ctype, field, str_type, cinit, string;
tree ctype, field = NULL_TREE, str_type, cinit, string;
static int utf8_count = 0;
int name_hash;
tree ref = IDENTIFIER_UTF8_REF (name);

View File

@ -432,7 +432,7 @@ void
init_decl_processing ()
{
register tree endlink;
tree field;
tree field = NULL_TREE;
tree t;
current_function_decl = NULL;

View File

@ -1431,7 +1431,8 @@ tree dtable_ident = NULL_TREE;
tree
build_known_method_ref (method, method_type, self_type, method_signature, arg_list)
tree method, method_type, self_type, method_signature, arg_list;
tree method, method_type ATTRIBUTE_UNUSED, self_type,
method_signature ATTRIBUTE_UNUSED, arg_list ATTRIBUTE_UNUSED;
{
tree func;
if (is_compiled_class (self_type))
@ -2230,7 +2231,7 @@ int
process_jvm_instruction (PC, byte_ops, length)
int PC;
unsigned char* byte_ops;
long length;
long length ATTRIBUTE_UNUSED;
{
const char *opname; /* Temporary ??? */
int oldpc = PC; /* PC at instruction start. */

View File

@ -145,19 +145,19 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
int saw_speclang = 0;
/* "-lm" or "-lmath" if it appears on the command line. */
char *saw_math = 0;
char *saw_math ATTRIBUTE_UNUSED = 0;
/* "-lc" if it appears on the command line. */
char *saw_libc = 0;
char *saw_libc ATTRIBUTE_UNUSED = 0;
/* "-lgcjgc" if it appears on the command line. */
char *saw_gc = 0;
char *saw_gc ATTRIBUTE_UNUSED = 0;
/* Saw `-l' option for the thread library. */
char *saw_threadlib = 0;
char *saw_threadlib ATTRIBUTE_UNUSED = 0;
/* Saw `-lgcj' on command line. */
int saw_libgcj = 0;
int saw_libgcj ATTRIBUTE_UNUSED = 0;
/* Saw -C or -o option, respectively. */
int saw_C = 0;

View File

@ -2211,7 +2211,7 @@ static const short yycheck[] = { 3,
#define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/lib/bison.simple"
#line 3 "/usr/local/gnu/share/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@ -2404,7 +2404,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
#line 196 "/usr/lib/bison.simple"
#line 196 "/usr/local/gnu/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@ -4690,7 +4690,7 @@ case 495:
break;}
}
/* the action file gets copied in in place of this dollarsign */
#line 498 "/usr/lib/bison.simple"
#line 498 "/usr/local/gnu/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@ -5850,7 +5850,6 @@ static void
maybe_generate_clinit ()
{
tree mdecl, c;
int has_non_primitive_fields = 0;
if (!ctxp->static_initialized || java_error_count)
return;
@ -7735,9 +7734,9 @@ static int
find_in_imports_on_demand (class_type)
tree class_type;
{
tree node, import, node_to_use;
tree node, import, node_to_use = NULL_TREE;
int seen_once = -1;
tree cl;
tree cl = NULL_TREE;
for (import = ctxp->import_demand_list; import; import = TREE_CHAIN (import))
{
@ -11811,7 +11810,7 @@ patch_binop (node, wfl_op1, wfl_op2)
tree op2 = TREE_OPERAND (node, 1);
tree op1_type = TREE_TYPE (op1);
tree op2_type = TREE_TYPE (op2);
tree prom_type;
tree prom_type = NULL_TREE;
int code = TREE_CODE (node);
/* If 1, tell the routine that we have to return error_mark_node
@ -12437,7 +12436,7 @@ patch_unaryop (node, wfl_op)
{
tree op = TREE_OPERAND (node, 0);
tree op_type = TREE_TYPE (op);
tree prom_type, value, decl;
tree prom_type = NULL_TREE, value, decl;
int code = TREE_CODE (node);
int error_found = 0;

View File

@ -3265,7 +3265,6 @@ static void
maybe_generate_clinit ()
{
tree mdecl, c;
int has_non_primitive_fields = 0;
if (!ctxp->static_initialized || java_error_count)
return;
@ -5150,9 +5149,9 @@ static int
find_in_imports_on_demand (class_type)
tree class_type;
{
tree node, import, node_to_use;
tree node, import, node_to_use = NULL_TREE;
int seen_once = -1;
tree cl;
tree cl = NULL_TREE;
for (import = ctxp->import_demand_list; import; import = TREE_CHAIN (import))
{
@ -9226,7 +9225,7 @@ patch_binop (node, wfl_op1, wfl_op2)
tree op2 = TREE_OPERAND (node, 1);
tree op1_type = TREE_TYPE (op1);
tree op2_type = TREE_TYPE (op2);
tree prom_type;
tree prom_type = NULL_TREE;
int code = TREE_CODE (node);
/* If 1, tell the routine that we have to return error_mark_node
@ -9852,7 +9851,7 @@ patch_unaryop (node, wfl_op)
{
tree op = TREE_OPERAND (node, 0);
tree op_type = TREE_TYPE (op);
tree prom_type, value, decl;
tree prom_type = NULL_TREE, value, decl;
int code = TREE_CODE (node);
int error_found = 0;

View File

@ -1039,7 +1039,7 @@ verify_jvm_instructions (jcf, byte_ops, length)
case OPCODE_lookupswitch:
{
jint npairs, last, not_registered = 1;
jint npairs, last = 0, not_registered = 1;
pop_type (int_type_node);
while (PC%4)

View File

@ -35,7 +35,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
static xref_flag_table xref_table [] = {
{NULL, NULL, NULL},
{NULL, NULL, NULL, NULL},
};
/* Decode an xref flag value. Return 0 if the flag wasn't found. */