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 (lSeek!=0)
|
||||||
{
|
{
|
||||||
if (fseek(s->file,lSeek,SEEK_CUR)==0)
|
if (fseek(s->file,lSeek,SEEK_CUR)!=0)
|
||||||
lSeek=0;
|
|
||||||
else
|
|
||||||
err=UNZ_ERRNO;
|
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 ((file_info.size_file_comment>0) && (commentBufferSize>0))
|
||||||
if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
|
if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
|
||||||
err=UNZ_ERRNO;
|
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;
|
lSeek+=file_info.size_file_comment - uSizeRead;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef __WXDEBUG__
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// lSeek is not used later in the code so update it only for debug purposes
|
||||||
lSeek+=file_info.size_file_comment;
|
lSeek+=file_info.size_file_comment;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((err==UNZ_OK) && (pfile_info!=NULL))
|
if ((err==UNZ_OK) && (pfile_info!=NULL))
|
||||||
*pfile_info=file_info;
|
*pfile_info=file_info;
|
||||||
@@ -742,7 +753,7 @@ extern int ZEXPORT unzGetCurrentFileInfo (file,
|
|||||||
extern int ZEXPORT unzGoToFirstFile (file)
|
extern int ZEXPORT unzGoToFirstFile (file)
|
||||||
unzFile file;
|
unzFile file;
|
||||||
{
|
{
|
||||||
int err=UNZ_OK;
|
int err;
|
||||||
unz_s* s;
|
unz_s* s;
|
||||||
if (file==NULL)
|
if (file==NULL)
|
||||||
return UNZ_PARAMERROR;
|
return UNZ_PARAMERROR;
|
||||||
@@ -950,7 +961,11 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
|
|||||||
extern int ZEXPORT unzOpenCurrentFile (file)
|
extern int ZEXPORT unzOpenCurrentFile (file)
|
||||||
unzFile file;
|
unzFile file;
|
||||||
{
|
{
|
||||||
int err=UNZ_OK;
|
int err
|
||||||
|
#ifdef __WXDEBUG__
|
||||||
|
=UNZ_OK
|
||||||
|
#endif
|
||||||
|
;
|
||||||
int Store;
|
int Store;
|
||||||
uInt iSizeVar;
|
uInt iSizeVar;
|
||||||
unz_s* s;
|
unz_s* s;
|
||||||
@@ -989,9 +1004,11 @@ extern int ZEXPORT unzOpenCurrentFile (file)
|
|||||||
|
|
||||||
pfile_in_zip_read_info->stream_initialised=0;
|
pfile_in_zip_read_info->stream_initialised=0;
|
||||||
|
|
||||||
|
#ifdef __WXDEBUG__
|
||||||
if ((s->cur_file_info.compression_method!=0) &&
|
if ((s->cur_file_info.compression_method!=0) &&
|
||||||
(s->cur_file_info.compression_method!=Z_DEFLATED))
|
(s->cur_file_info.compression_method!=Z_DEFLATED))
|
||||||
err=UNZ_BADZIPFILE;
|
err=UNZ_BADZIPFILE;
|
||||||
|
#endif
|
||||||
Store = s->cur_file_info.compression_method==0;
|
Store = s->cur_file_info.compression_method==0;
|
||||||
|
|
||||||
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
|
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
|
||||||
|
Reference in New Issue
Block a user