[PATCH] vircgroup: Remove unused variables in virCgroupV2Available

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

 



After recent commit 'contFile' and 'contStr' became unused breaking
build with clang:

../../../libvirt/src/util/vircgroupv2.c:72:26: error: unused variable 'contFile' [-Werror,-Wunused-variable]
        g_autofree char *contFile = NULL;
                         ^
../../../libvirt/src/util/vircgroupv2.c:73:26: error: unused variable 'contStr' [-Werror,-Wunused-variable]
        g_autofree char *contStr = NULL;
                         ^

Fixes: a0f37232b9c4296ca16955cc625f75eb848ace39
Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/vircgroupv2.c | 3 ---
 1 file changed, 3 deletions(-)

Pushed as a build fix.

diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index 0e0c61d466..bf6bd11fef 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -69,9 +69,6 @@ virCgroupV2Available(void)
         return false;

     while (getmntent_r(mounts, &entry, buf, sizeof(buf)) != NULL) {
-        g_autofree char *contFile = NULL;
-        g_autofree char *contStr = NULL;
-
         if (STRNEQ(entry.mnt_type, "cgroup2"))
             continue;

-- 
2.37.3




[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]

  Powered by Linux