Solved some type conversion warnings; replaced #warning with // TODO

This commit is contained in:
Gianluca Bertani
2015-09-09 21:00:36 +02:00
parent dbd1e5962f
commit 94312b945e
7 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ static voidpf file_build_ioposix(FILE *file, const char *filename)
return NULL;
ioposix = (FILE_IOPOSIX*)malloc(sizeof(FILE_IOPOSIX));
ioposix->file = file;
ioposix->filenameLength = strlen(filename) + 1;
ioposix->filenameLength = (int) (strlen(filename) + 1);
ioposix->filename = (char*)malloc(ioposix->filenameLength * sizeof(char));
strncpy(ioposix->filename, filename, ioposix->filenameLength);
return (voidpf)ioposix;
+5 -5
View File
@@ -646,14 +646,14 @@ local int unzGoToNextDisk(unzFile file)
if (s == NULL)
return UNZ_PARAMERROR;
pfile_in_zip_read_info = s->pfile_in_zip_read;
number_disk_next = s->number_disk;
number_disk_next = (int) s->number_disk;
if ((pfile_in_zip_read_info != NULL) && (pfile_in_zip_read_info->rest_read_uncompressed > 0))
/* We are currently reading a file and we need the next sequential disk */
number_disk_next += 1;
else
/* Goto the disk for the current file */
number_disk_next = s->cur_file_info.disk_num_start;
number_disk_next = (int) s->cur_file_info.disk_num_start;
if (number_disk_next != s->number_disk)
{
@@ -1390,8 +1390,8 @@ extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned len)
uInt total_bytes_read = 0;
if (pfile_in_zip_read_info->stream.next_in != NULL)
bytes_not_read = pfile_in_zip_read_info->read_buffer + UNZ_BUFSIZE -
pfile_in_zip_read_info->stream.next_in;
bytes_not_read = (uInt) (pfile_in_zip_read_info->read_buffer + UNZ_BUFSIZE -
pfile_in_zip_read_info->stream.next_in);
bytes_to_read -= bytes_not_read;
if (bytes_not_read > 0)
memcpy(pfile_in_zip_read_info->read_buffer, pfile_in_zip_read_info->stream.next_in, bytes_not_read);
@@ -1407,7 +1407,7 @@ extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned len)
ZLIB_FILEFUNC_SEEK_SET) != 0)
return UNZ_ERRNO;
bytes_read = ZREAD64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream,
bytes_read = (int) ZREAD64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream,
pfile_in_zip_read_info->read_buffer + bytes_not_read + total_bytes_read,
bytes_to_read - total_bytes_read);
+10 -10
View File
@@ -510,7 +510,7 @@ local int zipGoToFirstDisk(zipFile file)
return err;
number_disk_next = 0;
if (zi->number_disk_with_CD > 0)
number_disk_next = zi->number_disk_with_CD - 1;
number_disk_next = (int) (zi->number_disk_with_CD - 1);
err = zipGoToSpecificDisk(file, number_disk_next, (zi->append == APPEND_STATUS_ADDINZIP));
if ((err == ZIP_ERRNO) && (zi->append == APPEND_STATUS_ADDINZIP))
err = zipGoToSpecificDisk(file, number_disk_next, 0);
@@ -535,7 +535,7 @@ local int zipGoToNextDisk(zipFile file)
if (zi->disk_size == 0)
return err;
number_disk_next = zi->number_disk + 1;
number_disk_next = (int) (zi->number_disk + 1);
do
{
@@ -661,14 +661,14 @@ extern zipFile ZEXPORT zipOpen4(const void *pathname, int append, ZPOS64_T disk_
zip64_internal ziinit;
zip64_internal* zi;
ZPOS64_T byte_before_the_zipfile; /* byte before the zipfile, (>0 for sfx)*/
ZPOS64_T size_central_dir; /* size of the central directory */
ZPOS64_T offset_central_dir; /* offset of start of central directory */
ZPOS64_T number_entry_CD; /* total number of entries in the central dir */
ZPOS64_T size_central_dir = 0; /* size of the central directory */
ZPOS64_T offset_central_dir = 0; /* offset of start of central directory */
ZPOS64_T number_entry_CD = 0; /* total number of entries in the central dir */
ZPOS64_T number_entry;
ZPOS64_T central_pos;
ZPOS64_T size_central_dir_to_read;
uLong uL;
uLong size_comment;
uLong size_comment = 0;
size_t buf_size = SIZEDATA_INDATABLOCK;
void* buf_read;
int err = ZIP_OK;
@@ -1428,7 +1428,7 @@ local int zip64FlushWriteBuffer(zip64_internal* zi)
max_write = (uInt)size_available;
}
written = ZWRITE64(zi->z_filefunc, zi->filestream, zi->ci.buffered_data + total_written, max_write);
written = (int) ZWRITE64(zi->z_filefunc, zi->filestream, zi->ci.buffered_data + total_written, max_write);
if (ZERROR64(zi->z_filefunc,zi->filestream))
{
@@ -1784,7 +1784,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_si
/* Local file header is stored on previous disk, switch to make edits */
if (zi->ci.number_disk != cur_number_disk)
zipGoToSpecificDisk(file, zi->ci.number_disk, 1);
zipGoToSpecificDisk(file, (int) (zi->ci.number_disk), 1);
if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET) != 0)
err = ZIP_ERRNO;
@@ -1818,7 +1818,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_si
/* Now switch back again to the disk we were on before */
if (zi->ci.number_disk != cur_number_disk)
zipGoToSpecificDisk(file, cur_number_disk, 1);
zipGoToSpecificDisk(file, (int) cur_number_disk, 1);
if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip, ZLIB_FILEFUNC_SEEK_SET) != 0)
err = ZIP_ERRNO;
@@ -1877,7 +1877,7 @@ extern int ZEXPORT zipClose(zipFile file, const char* global_comment)
{
if ((err == ZIP_OK) && (ldi->filled_in_this_block > 0))
{
write = ZWRITE64(zi->z_filefunc, zi->filestream, ldi->data, ldi->filled_in_this_block);
write = (int) ZWRITE64(zi->z_filefunc, zi->filestream, ldi->data, ldi->filled_in_this_block);
if (write != ldi->filled_in_this_block)
err = ZIP_ERRNO;
}