From 7e21fe59b2a6fdd9b5ac1f11f554fd64a7285bbd Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Fri, 12 Mar 1999 17:13:24 +0000 Subject: Warning fixes: * constants.c (find_class_or_string_constant): Cast variable `j' to a `jword' when comparing against one. * expr.c (java_lang_expand_expr): Remove unused variables `has_finally_p' and `op0'. * gjavah.c (print_field_info): Cast a value to jint when comparing against one. Likewise for a jlong. (add_namelet): Likewise cast a `sizeof' to an int when comparing against a signed quantity. * jcf-dump.c (print_signature_type): Remove unused variable `digit'. (print_signature): Don't needlessly dereference variable `str' * jcf-reader.c (get_attribute): Mark variables `max_stack' and `max_locals' with ATTRIBUTE_UNUSED. (jcf_parse_class): Likewise for variable `index'. * parse.h (reverse_jdep_list): Remove static prototype. * parse.y (build_jump_to_finally): Remove prototype and definition. (reverse_jdep_list): Add static prototype. * typeck.c (convert_ieee_real_to_integer): Remove unused variables `assignment' and `expr_decl'. * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'. From-SVN: r25731 --- gcc/java/gjavah.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcc/java/gjavah.c') diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 5ec6a88..9b32836 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -335,7 +335,7 @@ DEFUN(print_field_info, (stream, jcf, name_index, sig_index, flags), num = JPOOL_INT (jcf, current_field_value); /* We single out the most negative number to print specially. This avoids later warnings from g++. */ - if (num == 0x80000000) + if (num == (jint) 0x80000000) { most_negative = 1; ++num; @@ -354,7 +354,7 @@ DEFUN(print_field_info, (stream, jcf, name_index, sig_index, flags), num = JPOOL_LONG (jcf, current_field_value); /* We single out the most negative number to print specially.. This avoids later warnings from g++. */ - if (num == 0x8000000000000000LL) + if (num == (jlong) 0x8000000000000000LL) { most_negative = 1; ++num; @@ -920,11 +920,11 @@ add_namelet (name, name_limit, parent) #define JAVALANG "java/lang/" #define JAVAIO "java/io/" #define JAVAUTIL "java/util/" - if ((name_limit - name >= sizeof (JAVALANG) - 1 + if ((name_limit - name >= (int) sizeof (JAVALANG) - 1 && ! strncmp (name, JAVALANG, sizeof (JAVALANG) - 1)) - || (name_limit - name >= sizeof (JAVAUTIL) - 1 + || (name_limit - name >= (int) sizeof (JAVAUTIL) - 1 && ! strncmp (name, JAVAUTIL, sizeof (JAVAUTIL) - 1)) - || (name_limit - name >= sizeof (JAVAIO) - 1 + || (name_limit - name >= (int) sizeof (JAVAIO) - 1 && ! strncmp (name, JAVAIO, sizeof (JAVAIO) - 1))) return; } -- cgit v1.1