[PATCH] virsh-network: Drop unused variables in cmdNetworkMetadata()

Michal Privoznik posted 1 patch 8 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/5912de7189a6ba5c97be8bdbd86d66aa804877ed.1692962652.git.mprivozn@redhat.com
tools/virsh-network.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] virsh-network: Drop unused variables in cmdNetworkMetadata()
Posted by Michal Privoznik 8 months, 1 week ago
In one of recent commits two variable were introduced (@ctxt and
@doc) that are not used. This breaks a build with clang who's
able to identify that.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

Pushed under trivial and build breaker rules.

 tools/virsh-network.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index f9fea0a126..5655254699 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -597,7 +597,6 @@ static bool
 cmdNetworkMetadata(vshControl *ctl, const vshCmd *cmd)
 {
     g_autoptr(virshNetwork) net = NULL;
-    g_autoptr(xmlXPathContext) ctxt = NULL;
     bool config = vshCommandOptBool(cmd, "config");
     bool live = vshCommandOptBool(cmd, "live");
     bool current = vshCommandOptBool(cmd, "current");
@@ -661,7 +660,7 @@ cmdNetworkMetadata(vshControl *ctl, const vshCmd *cmd)
         vshPrintExtra(ctl, "%s\n", _("Metadata modified"));
     } else {
         g_autofree char *data = NULL;
-        g_autoptr(xmlDoc) doc = NULL;
+
         /* get */
         if (!(data = virNetworkGetMetadata(net, VIR_NETWORK_METADATA_ELEMENT,
                                            uri, flags)))
-- 
2.41.0