Fixes for unused values and code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -685,19 +685,30 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
|
||||
|
||||
if (lSeek!=0)
|
||||
{
|
||||
if (fseek(s->file,lSeek,SEEK_CUR)==0)
|
||||
lSeek=0;
|
||||
else
|
||||
if (fseek(s->file,lSeek,SEEK_CUR)!=0)
|
||||
err=UNZ_ERRNO;
|
||||
#ifdef __WXDEBUG__
|
||||
// lSeek is not used later in the code so update it only for debug purposes
|
||||
else
|
||||
lSeek=0;
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
|
||||
if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
|
||||
err=UNZ_ERRNO;
|
||||
#ifdef __WXDEBUG__
|
||||
// lSeek is not used later in the code so update it only for debug purposes
|
||||
lSeek+=file_info.size_file_comment - uSizeRead;
|
||||
#endif
|
||||
}
|
||||
#ifdef __WXDEBUG__
|
||||
else
|
||||
{
|
||||
// lSeek is not used later in the code so update it only for debug purposes
|
||||
lSeek+=file_info.size_file_comment;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((err==UNZ_OK) && (pfile_info!=NULL))
|
||||
*pfile_info=file_info;
|
||||
@@ -742,7 +753,7 @@ extern int ZEXPORT unzGetCurrentFileInfo (file,
|
||||
extern int ZEXPORT unzGoToFirstFile (file)
|
||||
unzFile file;
|
||||
{
|
||||
int err=UNZ_OK;
|
||||
int err;
|
||||
unz_s* s;
|
||||
if (file==NULL)
|
||||
return UNZ_PARAMERROR;
|
||||
@@ -950,7 +961,11 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
|
||||
extern int ZEXPORT unzOpenCurrentFile (file)
|
||||
unzFile file;
|
||||
{
|
||||
int err=UNZ_OK;
|
||||
int err
|
||||
#ifdef __WXDEBUG__
|
||||
=UNZ_OK
|
||||
#endif
|
||||
;
|
||||
int Store;
|
||||
uInt iSizeVar;
|
||||
unz_s* s;
|
||||
@@ -989,9 +1004,11 @@ extern int ZEXPORT unzOpenCurrentFile (file)
|
||||
|
||||
pfile_in_zip_read_info->stream_initialised=0;
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
if ((s->cur_file_info.compression_method!=0) &&
|
||||
(s->cur_file_info.compression_method!=Z_DEFLATED))
|
||||
err=UNZ_BADZIPFILE;
|
||||
#endif
|
||||
Store = s->cur_file_info.compression_method==0;
|
||||
|
||||
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
|
||||
|
Reference in New Issue
Block a user