aports/community/fnc/maybe-uninit.patch
2023-11-04 12:59:58 +00:00

68 lines
1.7 KiB
Diff

--- a/lib/libfossil.c
+++ b/lib/libfossil.c
@@ -29404,7 +29404,7 @@
}
fsl_int_t fsl_file_size(const char *zFilename){
- fsl_fstat fst;
+ fsl_fstat fst = {0};
return ( 0 != fsl_stat(zFilename, &fst, 1) )
? -1
: (fsl_int_t)fst.size;
@@ -29421,7 +29421,7 @@
*/
fsl_time_t fsl_file_mtime(const char *zFilename){
- fsl_fstat fst;
+ fsl_fstat fst = {0};
return ( 0 != fsl_stat(zFilename, &fst, 1) )
? -1
: (fsl_time_t)fst.mtime;
@@ -29429,7 +29429,7 @@
bool fsl_is_file(const char *zFilename){
- fsl_fstat fst;
+ fsl_fstat fst = {0};
return ( 0 != fsl_stat(zFilename, &fst, 1) )
? false
: (FSL_FSTAT_TYPE_FILE == fst.type);
@@ -29440,7 +29440,7 @@
if(zFilename){/*unused var*/}
return false;
#else
- fsl_fstat fst;
+ fsl_fstat fst = {0};
return (0 == fsl_stat(zFilename, &fst, 0))
? (FSL_FSTAT_TYPE_LINK == fst.type)
: false;
@@ -29990,7 +29990,7 @@
}
int fsl_dir_check(const char *zFilename){
- fsl_fstat fst;
+ fsl_fstat fst = {0};
int rc;
if( zFilename ){
#if 1
@@ -33445,7 +33445,7 @@
if(0==rc) rc = fsl_stmt_get_text(&q, 1, &zName, NULL);
if(0==rc) rc = fsl_buffer_appendf(bFullName, "%s%s", f->ckout.dir, zName);
if(rc) goto merge_add_end;
- fsl_merge_fchange_e fchange;
+ fsl_merge_fchange_e fchange = 0;
if( fsl_is_file_or_link(fsl_buffer_cstr(bFullName))
&& !fsl_db_exists(db, "SELECT 1 FROM fv WHERE fn=%Q", zName) ){
if(opt->debug){
--- a/src/fnc.c
+++ b/src/fnc.c
@@ -5085,7 +5085,7 @@
char *pp, *pp0, *tmppath;
size_t idx, lineno;
int i, rc = FSL_RC_OK;
- bool drop;
+ bool drop = 0;
if ((tmpd = getenv("TMPDIR")) == NULL || *tmpd == '\0')
tmpd = P_tmpdir;