]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh-network: Drop unused variables in cmdNetworkMetadata()
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 25 Aug 2023 11:22:59 +0000 (13:22 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 25 Aug 2023 11:22:59 +0000 (13:22 +0200)
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>
tools/virsh-network.c

index f9fea0a12693aff95c9cf740c25a124e46cc8a7e..565525469926a9e7992799a1a7c582afecad1bf4 100644 (file)
@@ -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)))