]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[apr] scan-build: fix use of unassigned values in file_io/unix 362/head
authorAndrey Volk <andywolk@gmail.com>
Fri, 14 Feb 2020 21:33:50 +0000 (01:33 +0400)
committerAndrey Volk <andywolk@gmail.com>
Fri, 14 Feb 2020 21:33:50 +0000 (01:33 +0400)
libs/apr/file_io/unix/filepath.c
libs/apr/file_io/unix/filestat.c

index 78797bd990c5f353e6b086ba219af75084014260..cbf757e9abe4a1bcc881b7ccbb356390fbce1267 100644 (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)
index d27eafdcdf2106e3b3664af60f0a1a7b19693de0..a34b22c3700f535cb818ffa1457d748d00552f39 100644 (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) {