[PATCH 7/7] virStorageBackendLogicalMatchPoolSource: Initialize @thisSource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



storage/storage_backend_logical.c: In function 'virStorageBackendLogicalMatchPoolSource.isra.2':
storage/storage_backend_logical.c:618:33: error: 'thisSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                       thisSource->devices[j].path))
                                 ^

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/storage/storage_backend_logical.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 167fe58..ecbf430 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -575,7 +575,7 @@ static bool
 virStorageBackendLogicalMatchPoolSource(virStoragePoolObjPtr pool)
 {
     virStoragePoolSourceList sourceList;
-    virStoragePoolSource *thisSource;
+    virStoragePoolSource *thisSource = NULL;
     size_t i, j;
     int matchcount = 0;
     bool ret = false;
-- 
2.4.10

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]