diff options
author | Mike Stump <mrs@apple.com> | 2004-07-24 00:03:28 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2004-07-24 00:03:28 +0000 |
commit | 0e7d217a97d7002639bad1e6af71cc1021a92ed0 (patch) | |
tree | 0507a167efbef0282a0fc2a3f187f358cfe9b0a3 /gcc/java/gjavah.c | |
parent | ef05818b76a645f094e89f0804611d19c677f03f (diff) | |
download | gcc-0e7d217a97d7002639bad1e6af71cc1021a92ed0.zip gcc-0e7d217a97d7002639bad1e6af71cc1021a92ed0.tar.gz gcc-0e7d217a97d7002639bad1e6af71cc1021a92ed0.tar.bz2 |
boehm.c (set_bit): Improve type safety wrt unsignedness.
* boehm.c (set_bit): Improve type safety wrt unsignedness.
* gjavah.c (throwable_p, decode_signature_piece,
print_full_cxx_name, print_include, add_namelet, add_class_decl,
process_file): Likewise.
* jcf-dump.c (main): Likewise.
* jcf-io.c (read_zip_member): Likewise.
* jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
give_name_to_class, get_class_constant): Likewise.
* jcf-write.c (find_constant_wide, push_long_const,
generate_classfile): Likewise.
* lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
* parse.y (read_import_dir): Likewise.
* typeck.c (parse_signature_type): Likewise.
* verify.c (verify_jvm_instructions): Likewise.
* zextract.c (find_zip_file_start, read_zip_archive): Likewise.
From-SVN: r85102
Diffstat (limited to 'gcc/java/gjavah.c')
-rw-r--r-- | gcc/java/gjavah.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 6765c16..8f53df1 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -1144,11 +1144,11 @@ throwable_p (const unsigned char *clname) (htab_del) free); /* Make sure the root classes show up in the tables. */ - str = xstrdup ("java.lang.Throwable"); + str = (unsigned char *) xstrdup ("java.lang.Throwable"); slot = htab_find_slot (throw_hash, str, INSERT); *slot = str; - str = xstrdup ("java.lang.Object"); + str = (unsigned char *) xstrdup ("java.lang.Object"); slot = htab_find_slot (non_throw_hash, str, INSERT); *slot = str; @@ -1175,7 +1175,7 @@ throwable_p (const unsigned char *clname) void **slot; unsigned char *super, *tmp; int super_length = -1; - const char *classfile_name = find_class (current, strlen (current), + const char *classfile_name = find_class ((char *) current, strlen ((const char *) current), &jcf, 0); if (! classfile_name) @@ -1321,10 +1321,10 @@ decode_signature_piece (FILE *stream, const unsigned char *signature, if (flag_jni) { /* We know about certain types and special-case their names. */ - if (! strncmp (signature, "Ljava/lang/String;", + if (! strncmp ((const char *) signature, "Ljava/lang/String;", sizeof ("Ljava/lang/String;") -1)) ctype = "jstring"; - else if (! strncmp (signature, "Ljava/lang/Class;", + else if (! strncmp ((const char *) signature, "Ljava/lang/Class;", sizeof ("Ljava/lang/Class;") - 1)) ctype = "jclass"; /* Skip leading 'L' for throwable_p call. */ @@ -1469,7 +1469,7 @@ print_full_cxx_name (FILE* stream, JCF* jcf, int name_index, int sig_len = JPOOL_UTF_LENGTH (jcf, signature_index); if (overloaded_jni_method_exists_p (JPOOL_UTF_DATA (jcf, name_index), JPOOL_UTF_LENGTH (jcf, name_index), - signature, sig_len)) + (const char *) signature, sig_len)) { /* If this method is overloaded by another native method, then include the argument information in the mangled @@ -1743,19 +1743,19 @@ print_include (FILE *out, const unsigned char *utf8, int len) return; if (len == -1) - len = strlen (utf8); + len = strlen ((const char *) utf8); for (incl = all_includes; incl; incl = incl->next) { /* We check the length because we might have a proper prefix. */ if (len == (int) strlen (incl->name) - && ! strncmp (incl->name, utf8, len)) + && ! strncmp (incl->name, (const char *) utf8, len)) return; } incl = xmalloc (sizeof (struct include)); incl->name = xmalloc (len + 1); - strncpy (incl->name, utf8, len); + strncpy (incl->name, (const char *) utf8, len); incl->name[len] = '\0'; incl->next = all_includes; all_includes = incl; @@ -1814,11 +1814,11 @@ add_namelet (const unsigned char *name, const unsigned char *name_limit, #define JAVAIO "java/io/" #define JAVAUTIL "java/util/" if ((name_limit - name >= (int) sizeof (JAVALANG) - 1 - && ! strncmp (name, JAVALANG, sizeof (JAVALANG) - 1)) + && ! strncmp ((const char *) name, JAVALANG, sizeof (JAVALANG) - 1)) || (name_limit - name >= (int) sizeof (JAVAUTIL) - 1 - && ! strncmp (name, JAVAUTIL, sizeof (JAVAUTIL) - 1)) + && ! strncmp ((const char *) name, JAVAUTIL, sizeof (JAVAUTIL) - 1)) || (name_limit - name >= (int) sizeof (JAVAIO) - 1 - && ! strncmp (name, JAVAIO, sizeof (JAVAIO) - 1))) + && ! strncmp ((const char *) name, JAVAIO, sizeof (JAVAIO) - 1))) return; } @@ -1830,7 +1830,7 @@ add_namelet (const unsigned char *name, const unsigned char *name_limit, { /* We check the length because we might have a proper prefix. */ if ((int) strlen (np->name) == p - name && - ! strncmp (name, np->name, p - name)) + ! strncmp ((const char *) name, np->name, p - name)) { n = np; break; @@ -1841,7 +1841,7 @@ add_namelet (const unsigned char *name, const unsigned char *name_limit, { n = xmalloc (sizeof (struct namelet)); n->name = xmalloc (p - name + 1); - strncpy (n->name, name, p - name); + strncpy (n->name, (const char *) name, p - name); n->name[p - name] = '\0'; n->is_class = (p == name_limit); n->subnamelets = NULL; @@ -1923,7 +1923,7 @@ add_class_decl (FILE *out, JCF *jcf, JCF_u2 signature) /* If we see an array, then we include the array header. */ if (s[i] == '[') { - print_include (out, "gcj/array", -1); + print_include (out, (const unsigned char *) "gcj/array", -1); continue; } @@ -2094,13 +2094,13 @@ process_file (JCF *jcf, FILE *out) for (i = 0; i < len; ++i) name[i] = jcf->classname[i] == '.' ? '/' : jcf->classname[i]; name[i] = '\0'; - print_include (out, name, len); + print_include (out, (const unsigned char *) name, len); free (name); if (! flag_jni) { - print_include (out, "gcj/cni", -1); - print_include (out, "java/lang/UnsupportedOperationException", + print_include (out, (const unsigned char *) "gcj/cni", -1); + print_include (out, (const unsigned char *) "java/lang/UnsupportedOperationException", -1); } } |