[apr] scan-build: fix use of unassigned values in file_io/unix

This commit is contained in:
Andrey Volk 2020-02-15 01:33:50 +04:00
parent 0d29633e23
commit 2db40835c5
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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) {