From 2db40835c517b10381cacc95e946f6faf3133f11 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Sat, 15 Feb 2020 01:33:50 +0400 Subject: [PATCH] [apr] scan-build: fix use of unassigned values in file_io/unix --- libs/apr/file_io/unix/filepath.c | 2 +- libs/apr/file_io/unix/filestat.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/apr/file_io/unix/filepath.c b/libs/apr/file_io/unix/filepath.c index 78797bd990..cbf757e9ab 100644 --- a/libs/apr/file_io/unix/filepath.c +++ b/libs/apr/file_io/unix/filepath.c @@ -133,7 +133,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath, * but required since the compiler (at least vc) doesn't like * passing the address of a char const* for a char** arg. */ - char *getpath; + char *getpath = NULL; rv = apr_filepath_get(&getpath, flags, p); rootpath = getpath; if (rv != APR_SUCCESS) diff --git a/libs/apr/file_io/unix/filestat.c b/libs/apr/file_io/unix/filestat.c index d27eafdcdf..a34b22c370 100644 --- a/libs/apr/file_io/unix/filestat.c +++ b/libs/apr/file_io/unix/filestat.c @@ -130,7 +130,7 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname, apr_pool_t *pool) { apr_status_t status; - apr_finfo_t finfo; + apr_finfo_t finfo = {0}; /* Don't do anything if we can't handle the requested attributes */ if (!(attr_mask & (APR_FILE_ATTR_READONLY @@ -185,7 +185,7 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname, apr_pool_t *pool) { apr_status_t status; - apr_finfo_t finfo; + apr_finfo_t finfo = {0}; status = apr_stat(&finfo, fname, APR_FINFO_ATIME, pool); if (status) {