Changeset 95239 in vbox for trunk/src/libs/zlib-1.2.12/contrib/minizip/unzip.c
- Timestamp:
- Jun 9, 2022 9:09:44 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151769
- Location:
- trunk/src/libs/zlib-1.2.12
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/zlib-1.2.12
- Property svn:mergeinfo
-
old new 20 20 /branches/dsen/gui3/src/libs/zlib-1.2.11:79645-79692 21 21 /trunk/src/src/libs/zlib-1.2.11:92342 22 /vendor/zlib/1.2.12:151751 23 /vendor/zlib/current:150724-151750
-
- Property svn:mergeinfo
-
trunk/src/libs/zlib-1.2.12/contrib/minizip/unzip.c
r76163 r95239 456 456 ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) 457 457 { 458 uPosFound = uReadPos+ i;458 uPosFound = uReadPos+(unsigned)i; 459 459 break; 460 460 } … … 524 524 ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) 525 525 { 526 uPosFound = uReadPos+ i;526 uPosFound = uReadPos+(unsigned)i; 527 527 break; 528 528 } … … 854 854 ZPOS64_T uDate; 855 855 uDate = (ZPOS64_T)(ulDosDate>>16); 856 ptm->tm_mday = ( uInt)(uDate&0x1f) ;857 ptm->tm_mon = ( uInt)((((uDate)&0x1E0)/0x20)-1) ;858 ptm->tm_year = ( uInt)(((uDate&0x0FE00)/0x0200)+1980) ;859 860 ptm->tm_hour = ( uInt) ((ulDosDate &0xF800)/0x800);861 ptm->tm_min = ( uInt) ((ulDosDate&0x7E0)/0x20) ;862 ptm->tm_sec = ( uInt) (2*(ulDosDate&0x1f)) ;856 ptm->tm_mday = (int)(uDate&0x1f) ; 857 ptm->tm_mon = (int)((((uDate)&0x1E0)/0x20)-1) ; 858 ptm->tm_year = (int)(((uDate&0x0FE00)/0x0200)+1980) ; 859 860 ptm->tm_hour = (int) ((ulDosDate &0xF800)/0x800); 861 ptm->tm_min = (int) ((ulDosDate&0x7E0)/0x20) ; 862 ptm->tm_sec = (int) (2*(ulDosDate&0x1f)) ; 863 863 } 864 864 … … 994 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 997 lSeek=0; 998 998 else … … 1019 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 1022 lSeek=0; 1023 1023 else … … 1091 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 1094 lSeek=0; 1095 1095 else … … 1768 1768 if ((pfile_in_zip_read_info->stream.avail_in == 0) && 1769 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 1772 if (pfile_in_zip_read_info->stream.avail_out < … … 1858 1858 1859 1859 uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; 1860 /* Detect overflow, because z_stream.total_out is uLong (32 bits) */ 1861 if (uTotalOutAfter<uTotalOutBefore) 1862 uTotalOutAfter += 1LL << 32; /* Add maximum value of uLong + 1 */ 1860 1863 uOutThis = uTotalOutAfter-uTotalOutBefore; 1861 1864 … … 1872 1875 1873 1876 if (err==Z_STREAM_END) 1874 return (iRead==0) ? UNZ_EOF : iRead;1877 return (iRead==0) ? UNZ_EOF : (int)iRead; 1875 1878 if (err!=Z_OK) 1876 1879 break; … … 1879 1882 1880 1883 if (err==Z_OK) 1881 return iRead;1884 return (int)iRead; 1882 1885 return err; 1883 1886 }
Note:
See TracChangeset
for help on using the changeset viewer.