diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-24 00:03:28 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-24 00:03:28 +0000 |
commit | 8e452f9c0c8f40aeee57cd573a9d638e53872aea (patch) | |
tree | 0507a167efbef0282a0fc2a3f187f358cfe9b0a3 /gcc/java/zextract.c | |
parent | f8d61150ea3979ea4f36fcff728e3e252bf765b3 (diff) | |
download | gcc-8e452f9c0c8f40aeee57cd573a9d638e53872aea.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85102 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/zextract.c')
-rw-r--r-- | gcc/java/zextract.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/java/zextract.c b/gcc/java/zextract.c index ee464124d22..eeea9445795 100644 --- a/gcc/java/zextract.c +++ b/gcc/java/zextract.c @@ -264,7 +264,7 @@ find_zip_file_start (int fd, long offset) if (read (fd, buffer, LREC_SIZE + 4) != LREC_SIZE + 4) return -1; - if (buffer[0] != 'P' || strncmp (&buffer[1], LOCAL_HDR_SIG, 3)) + if (buffer[0] != 'P' || strncmp ((const char *) &buffer[1], LOCAL_HDR_SIG, 3)) return -1; filename_length = makeword (&buffer[4 + L_FILENAME_LENGTH]); @@ -287,8 +287,8 @@ read_zip_archive (ZipFile *zipf) return -1; if (read (zipf->fd, buffer, ECREC_SIZE+4) != ECREC_SIZE+4) return -2; - zipf->count = makeword(&buffer[TOTAL_ENTRIES_CENTRAL_DIR]); - zipf->dir_size = makelong(&buffer[SIZE_CENTRAL_DIRECTORY]); + zipf->count = makeword((const uch *) &buffer[TOTAL_ENTRIES_CENTRAL_DIR]); + zipf->dir_size = makelong((const uch *) &buffer[SIZE_CENTRAL_DIRECTORY]); #define ALLOC xmalloc /* Allocate 1 more to allow appending '\0' to last filename. */ zipf->central_directory = ALLOC (zipf->dir_size+1); @@ -306,9 +306,9 @@ read_zip_archive (ZipFile *zipf) printf ("total_entries_central_dir = %d\n", makeword(&buffer[TOTAL_ENTRIES_CENTRAL_DIR])); printf ("size_central_directory = %d\n", - makelong(&buffer[SIZE_CENTRAL_DIRECTORY])); + makelong((const uch *) &buffer[SIZE_CENTRAL_DIRECTORY])); printf ("offset_start_central_directory = %d\n", - makelong(&buffer[OFFSET_START_CENTRAL_DIRECTORY])); + makelong((const uch *) &buffer[OFFSET_START_CENTRAL_DIRECTORY])); printf ("zipfile_comment_length = %d\n", makeword(&buffer[ZIPFILE_COMMENT_LENGTH])); #endif @@ -319,11 +319,11 @@ read_zip_archive (ZipFile *zipf) { ZipDirectory *zipd = (ZipDirectory*)(dir_ptr + dir_last_pad); int compression_method = (int) dir_ptr[4+C_COMPRESSION_METHOD]; - long size = makelong (&dir_ptr[4+C_COMPRESSED_SIZE]); - long uncompressed_size = makelong (&dir_ptr[4+C_UNCOMPRESSED_SIZE]); - long filename_length = makeword (&dir_ptr[4+C_FILENAME_LENGTH]); - long extra_field_length = makeword (&dir_ptr[4+C_EXTRA_FIELD_LENGTH]); - long file_offset = makelong (&dir_ptr[4+C_RELATIVE_OFFSET_LOCAL_HEADER]); + long size = makelong ((const uch *) &dir_ptr[4+C_COMPRESSED_SIZE]); + long uncompressed_size = makelong ((const uch *) &dir_ptr[4+C_UNCOMPRESSED_SIZE]); + long filename_length = makeword ((const uch *) &dir_ptr[4+C_FILENAME_LENGTH]); + long extra_field_length = makeword ((const uch *) &dir_ptr[4+C_EXTRA_FIELD_LENGTH]); + long file_offset = makelong ((const uch *) &dir_ptr[4+C_RELATIVE_OFFSET_LOCAL_HEADER]); int unpadded_direntry_length; if ((dir_ptr-zipf->central_directory)+filename_length+CREC_SIZE+4>zipf->dir_size) return -1; |