Projects
openEuler:24.03:SP1:Everything
zlib
_service:tar_scm:backport-avoid-uninitialized-a...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-avoid-uninitialized-and-unused-warnings-in-contrib-minizip.patch of Package zlib
From 25bbd7f5a6a172b83b59fab7a80c55d1533dd100 Mon Sep 17 00:00:00 2001 From: Mark Adler <madler@alumni.caltech.edu> Date: Thu, 17 Aug 2023 21:40:28 -0700 Subject: [PATCH] Avoid uninitialized and unused warnings in contrib/minizip. Reference:https://github.com/madler/zlib/commit/25bbd7f5a6a172b83b59fab7a80c55d1533dd100 Conflict:NA --- contrib/minizip/miniunz.c | 10 ++++++++-- contrib/minizip/minizip.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c index 3d65401..507820d 100644 --- a/contrib/minizip/miniunz.c +++ b/contrib/minizip/miniunz.c @@ -113,7 +113,11 @@ void change_file_date(filename,dosdate,tmu_date) ut.actime=ut.modtime=mktime(&newdate); utime(filename,&ut); -#endif +#else + (void)filename; + (void)dosdate; + (void)tmu_date; +#endif #endif } @@ -131,6 +135,8 @@ int mymkdir(dirname) ret = mkdir (dirname,0775); #elif __APPLE__ ret = mkdir (dirname,0775); +#else + (void)dirname; #endif return ret; } @@ -248,7 +254,7 @@ int do_list(uf) char filename_inzip[256]; unz_file_info64 file_info; uLong ratio=0; - const char *string_method; + const char *string_method = ""; char charCrypt=' '; err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0); if (err!=UNZ_OK) diff --git a/contrib/minizip/minizip.c b/contrib/minizip/minizip.c index c5d9cc6..5dde38f 100644 --- a/contrib/minizip/minizip.c +++ b/contrib/minizip/minizip.c @@ -395,7 +395,7 @@ int main(argc,argv) ((argv[i][1]>='0') && (argv[i][1]<='9'))) && (strlen(argv[i]) == 2))) { - FILE * fin; + FILE * fin = NULL; size_t size_read; const char* filenameinzip = argv[i]; const char *savefilenameinzip; -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2