summaryrefslogtreecommitdiff
path: root/contrib/minizip/miniunz.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/minizip/miniunz.c')
-rw-r--r--contrib/minizip/miniunz.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c
index 3d65401..8e34bd9 100644
--- a/contrib/minizip/miniunz.c
+++ b/contrib/minizip/miniunz.c
@@ -45,6 +45,7 @@
45#include <time.h> 45#include <time.h>
46#include <errno.h> 46#include <errno.h>
47#include <fcntl.h> 47#include <fcntl.h>
48#include <sys/stat.h>
48 49
49#ifdef _WIN32 50#ifdef _WIN32
50# include <direct.h> 51# include <direct.h>
@@ -97,7 +98,8 @@ void change_file_date(filename,dosdate,tmu_date)
97 SetFileTime(hFile,&ftm,&ftLastAcc,&ftm); 98 SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
98 CloseHandle(hFile); 99 CloseHandle(hFile);
99#else 100#else
100#ifdef unix || __APPLE__ 101#if defined(unix) || defined(__APPLE__)
102 (void)dosdate;
101 struct utimbuf ut; 103 struct utimbuf ut;
102 struct tm newdate; 104 struct tm newdate;
103 newdate.tm_sec = tmu_date.tm_sec; 105 newdate.tm_sec = tmu_date.tm_sec;
@@ -136,7 +138,7 @@ int mymkdir(dirname)
136} 138}
137 139
138int makedir (newdir) 140int makedir (newdir)
139 char *newdir; 141 const char *newdir;
140{ 142{
141 char *buffer ; 143 char *buffer ;
142 char *p; 144 char *p;
@@ -324,7 +326,6 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
324 uInt size_buf; 326 uInt size_buf;
325 327
326 unz_file_info64 file_info; 328 unz_file_info64 file_info;
327 uLong ratio=0;
328 err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0); 329 err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
329 330
330 if (err!=UNZ_OK) 331 if (err!=UNZ_OK)
@@ -481,7 +482,6 @@ int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
481 uLong i; 482 uLong i;
482 unz_global_info64 gi; 483 unz_global_info64 gi;
483 int err; 484 int err;
484 FILE* fout=NULL;
485 485
486 err = unzGetGlobalInfo64(uf,&gi); 486 err = unzGetGlobalInfo64(uf,&gi);
487 if (err!=UNZ_OK) 487 if (err!=UNZ_OK)
@@ -515,7 +515,6 @@ int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,passwo
515 int opt_overwrite; 515 int opt_overwrite;
516 const char* password; 516 const char* password;
517{ 517{
518 int err = UNZ_OK;
519 if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK) 518 if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK)
520 { 519 {
521 printf("file %s not found in the zipfile\n",filename); 520 printf("file %s not found in the zipfile\n",filename);