From b4b63e32e6e0d8b8d499faf44c8de91231d26ec8 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 12 May 1999 17:04:30 +0000 Subject: [PATCH] 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 --- gcc/java/ChangeLog | 10 ++++++++++ gcc/java/expr.c | 5 +++-- gcc/java/jcf-io.c | 2 +- gcc/java/jcf-reader.c | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 30ad75d110c..588e1aff19e 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,15 @@ 1999-05-12 Kaveh R. Ghazi + * 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 HOST_BITS_PER_CHAR. diff --git a/gcc/java/expr.c b/gcc/java/expr.c index d6e51a1cf2d..d975c42c5ed 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1565,7 +1565,7 @@ static void expand_invoke (opcode, method_ref_index, nargs) int opcode; int method_ref_index; - int nargs; + int nargs ATTRIBUTE_UNUSED; { tree method_signature = COMPONENT_REF_SIGNATURE(¤t_jcf->cpool, method_ref_index); tree method_name = COMPONENT_REF_NAME (¤t_jcf->cpool, method_ref_index); @@ -2118,7 +2118,8 @@ expand_byte_code (jcf, method) NOTE_LABEL (default_offset+oldpc); \ if (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); } \ } diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c index e4d614d687e..95332186545 100644 --- a/gcc/java/jcf-io.c +++ b/gcc/java/jcf-io.c @@ -36,7 +36,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ int DEFUN(jcf_unexpected_eof, (jcf, count), - JCF *jcf AND int count) + JCF *jcf AND int count ATTRIBUTE_UNUSED) { if (jcf->filename) fprintf (stderr, "Premature end of .class file %s.\n", jcf->filename); diff --git a/gcc/java/jcf-reader.c b/gcc/java/jcf-reader.c index accb1a11706..c6207a235c9 100644 --- a/gcc/java/jcf-reader.c +++ b/gcc/java/jcf-reader.c @@ -35,7 +35,7 @@ DEFUN(get_attribute, (jcf), uint32 start_pos = JCF_TELL(jcf); int name_length; unsigned char *name_data; - JCF_FILL (jcf, attribute_length); + JCF_FILL (jcf, (long) attribute_length); if (attribute_name <= 0 || attribute_name >= JPOOL_SIZE(jcf)) return -2; if (JPOOL_TAG (jcf, attribute_name) != CONSTANT_Utf8) @@ -128,7 +128,7 @@ DEFUN(get_attribute, (jcf), JCF_SKIP (jcf, attribute_length); #endif } - if (start_pos + attribute_length != JCF_TELL(jcf)) + if ((long) (start_pos + attribute_length) != JCF_TELL(jcf)) return -1; return 0; } -- 2.30.2