diff options
Diffstat (limited to 'contrib/minizip/unzip.c')
-rw-r--r-- | contrib/minizip/unzip.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c index b16a75e..5e12e47 100644 --- a/contrib/minizip/unzip.c +++ b/contrib/minizip/unzip.c | |||
@@ -455,7 +455,7 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f | |||
455 | if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && | 455 | if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && |
456 | ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) | 456 | ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) |
457 | { | 457 | { |
458 | uPosFound = uReadPos+i; | 458 | uPosFound = uReadPos+(unsigned)i; |
459 | break; | 459 | break; |
460 | } | 460 | } |
461 | 461 | ||
@@ -523,7 +523,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib | |||
523 | if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && | 523 | if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && |
524 | ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) | 524 | ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) |
525 | { | 525 | { |
526 | uPosFound = uReadPos+i; | 526 | uPosFound = uReadPos+(unsigned)i; |
527 | break; | 527 | break; |
528 | } | 528 | } |
529 | 529 | ||
@@ -853,13 +853,13 @@ local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm) | |||
853 | { | 853 | { |
854 | ZPOS64_T uDate; | 854 | ZPOS64_T uDate; |
855 | uDate = (ZPOS64_T)(ulDosDate>>16); | 855 | uDate = (ZPOS64_T)(ulDosDate>>16); |
856 | ptm->tm_mday = (uInt)(uDate&0x1f) ; | 856 | ptm->tm_mday = (int)(uDate&0x1f) ; |
857 | ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; | 857 | ptm->tm_mon = (int)((((uDate)&0x1E0)/0x20)-1) ; |
858 | ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; | 858 | ptm->tm_year = (int)(((uDate&0x0FE00)/0x0200)+1980) ; |
859 | 859 | ||
860 | ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); | 860 | ptm->tm_hour = (int) ((ulDosDate &0xF800)/0x800); |
861 | ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; | 861 | ptm->tm_min = (int) ((ulDosDate&0x7E0)/0x20) ; |
862 | ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; | 862 | ptm->tm_sec = (int) (2*(ulDosDate&0x1f)) ; |
863 | } | 863 | } |
864 | 864 | ||
865 | /* | 865 | /* |
@@ -993,7 +993,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, | |||
993 | 993 | ||
994 | if (lSeek!=0) | 994 | if (lSeek!=0) |
995 | { | 995 | { |
996 | if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) | 996 | if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) |
997 | lSeek=0; | 997 | lSeek=0; |
998 | else | 998 | else |
999 | err=UNZ_ERRNO; | 999 | err=UNZ_ERRNO; |
@@ -1018,7 +1018,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, | |||
1018 | 1018 | ||
1019 | if (lSeek!=0) | 1019 | if (lSeek!=0) |
1020 | { | 1020 | { |
1021 | if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) | 1021 | if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) |
1022 | lSeek=0; | 1022 | lSeek=0; |
1023 | else | 1023 | else |
1024 | err=UNZ_ERRNO; | 1024 | err=UNZ_ERRNO; |
@@ -1090,7 +1090,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, | |||
1090 | 1090 | ||
1091 | if (lSeek!=0) | 1091 | if (lSeek!=0) |
1092 | { | 1092 | { |
1093 | if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) | 1093 | if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) |
1094 | lSeek=0; | 1094 | lSeek=0; |
1095 | else | 1095 | else |
1096 | err=UNZ_ERRNO; | 1096 | err=UNZ_ERRNO; |
@@ -1767,7 +1767,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) | |||
1767 | 1767 | ||
1768 | if ((pfile_in_zip_read_info->stream.avail_in == 0) && | 1768 | if ((pfile_in_zip_read_info->stream.avail_in == 0) && |
1769 | (pfile_in_zip_read_info->rest_read_compressed == 0)) | 1769 | (pfile_in_zip_read_info->rest_read_compressed == 0)) |
1770 | return (iRead==0) ? UNZ_EOF : iRead; | 1770 | return (iRead==0) ? UNZ_EOF : (int)iRead; |
1771 | 1771 | ||
1772 | if (pfile_in_zip_read_info->stream.avail_out < | 1772 | if (pfile_in_zip_read_info->stream.avail_out < |
1773 | pfile_in_zip_read_info->stream.avail_in) | 1773 | pfile_in_zip_read_info->stream.avail_in) |
@@ -1874,14 +1874,14 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) | |||
1874 | iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); | 1874 | iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); |
1875 | 1875 | ||
1876 | if (err==Z_STREAM_END) | 1876 | if (err==Z_STREAM_END) |
1877 | return (iRead==0) ? UNZ_EOF : iRead; | 1877 | return (iRead==0) ? UNZ_EOF : (int)iRead; |
1878 | if (err!=Z_OK) | 1878 | if (err!=Z_OK) |
1879 | break; | 1879 | break; |
1880 | } | 1880 | } |
1881 | } | 1881 | } |
1882 | 1882 | ||
1883 | if (err==Z_OK) | 1883 | if (err==Z_OK) |
1884 | return iRead; | 1884 | return (int)iRead; |
1885 | return err; | 1885 | return err; |
1886 | } | 1886 | } |
1887 | 1887 | ||