Commit b4b63e32 by Kaveh R. Ghazi Committed by Kaveh Ghazi

expr.c (expand_invoke): Mark parameter `nargs' with ATTRIBUTE_UNUSED.

        * expr.c (expand_invoke): Mark parameter `nargs' with
        ATTRIBUTE_UNUSED.
        (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
        * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
        ATTRIBUTE_UNUSED.
        * jcf-reader.c (get_attribute): Cast a value to long
        when comparing against a signed expression.  Likewise.

From-SVN: r26907
parent 34ba56fa
1999-05-12 Kaveh R. Ghazi <ghazi@snafu.rutgers.edu> 1999-05-12 Kaveh R. Ghazi <ghazi@snafu.rutgers.edu>
* expr.c (expand_invoke): Mark parameter `nargs' with
ATTRIBUTE_UNUSED.
(PRE_LOOKUP_SWITCH): Likewise for variable `match'.
* jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
ATTRIBUTE_UNUSED.
* jcf-reader.c (get_attribute): Cast a value to long
when comparing against a signed expression. Likewise.
* lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
HOST_BITS_PER_CHAR. HOST_BITS_PER_CHAR.
......
...@@ -1565,7 +1565,7 @@ static void ...@@ -1565,7 +1565,7 @@ static void
expand_invoke (opcode, method_ref_index, nargs) expand_invoke (opcode, method_ref_index, nargs)
int opcode; int opcode;
int method_ref_index; int method_ref_index;
int nargs; int nargs ATTRIBUTE_UNUSED;
{ {
tree method_signature = COMPONENT_REF_SIGNATURE(&current_jcf->cpool, method_ref_index); tree method_signature = COMPONENT_REF_SIGNATURE(&current_jcf->cpool, method_ref_index);
tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index); tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index);
...@@ -2118,7 +2118,8 @@ expand_byte_code (jcf, method) ...@@ -2118,7 +2118,8 @@ expand_byte_code (jcf, method)
NOTE_LABEL (default_offset+oldpc); \ NOTE_LABEL (default_offset+oldpc); \
if (npairs >= 0) \ if (npairs >= 0) \
while (--npairs >= 0) { \ while (--npairs >= 0) { \
jint match = IMMEDIATE_s4; jint offset = IMMEDIATE_s4; \ jint match ATTRIBUTE_UNUSED = IMMEDIATE_s4; \
jint offset = IMMEDIATE_s4; \
NOTE_LABEL (offset+oldpc); } \ NOTE_LABEL (offset+oldpc); } \
} }
......
...@@ -36,7 +36,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -36,7 +36,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
int int
DEFUN(jcf_unexpected_eof, (jcf, count), DEFUN(jcf_unexpected_eof, (jcf, count),
JCF *jcf AND int count) JCF *jcf AND int count ATTRIBUTE_UNUSED)
{ {
if (jcf->filename) if (jcf->filename)
fprintf (stderr, "Premature end of .class file %s.\n", jcf->filename); fprintf (stderr, "Premature end of .class file %s.\n", jcf->filename);
......
...@@ -35,7 +35,7 @@ DEFUN(get_attribute, (jcf), ...@@ -35,7 +35,7 @@ DEFUN(get_attribute, (jcf),
uint32 start_pos = JCF_TELL(jcf); uint32 start_pos = JCF_TELL(jcf);
int name_length; int name_length;
unsigned char *name_data; unsigned char *name_data;
JCF_FILL (jcf, attribute_length); JCF_FILL (jcf, (long) attribute_length);
if (attribute_name <= 0 || attribute_name >= JPOOL_SIZE(jcf)) if (attribute_name <= 0 || attribute_name >= JPOOL_SIZE(jcf))
return -2; return -2;
if (JPOOL_TAG (jcf, attribute_name) != CONSTANT_Utf8) if (JPOOL_TAG (jcf, attribute_name) != CONSTANT_Utf8)
...@@ -128,7 +128,7 @@ DEFUN(get_attribute, (jcf), ...@@ -128,7 +128,7 @@ DEFUN(get_attribute, (jcf),
JCF_SKIP (jcf, attribute_length); JCF_SKIP (jcf, attribute_length);
#endif #endif
} }
if (start_pos + attribute_length != JCF_TELL(jcf)) if ((long) (start_pos + attribute_length) != JCF_TELL(jcf))
return -1; return -1;
return 0; return 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