blob: af28ba71e7f65b60c8e4f4e0cc19da3a0483c444 [file] [log] [blame]
From e5bd4c3853fb394edc8cbea17fad82ce23bd0fae Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 27 Nov 2020 12:21:32 -0800
Subject: [PATCH 1/2] dbus: Remove unused variabes
This issue is seen when using clang to compile it
Same fix is needed for parse.c and networkd.c,
Fixes
src/dbus.c:49:23: error: unused variable 'stdout' [-Werror,-Wunused-variable]
g_autofree gchar *stdout = NULL;
^
Upstream-Status: Submitted [https://github.com/CanonicalLtd/netplan/pull/175]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/dbus.c | 3 ---
src/networkd.c | 1 -
src/parse.c | 1 -
3 files changed, 5 deletions(-)
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -45,9 +45,6 @@ static int method_apply(sd_bus_message *
static int method_info(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
sd_bus_message *reply = NULL;
- g_autoptr(GError) err = NULL;
- g_autofree gchar *stdout = NULL;
- g_autofree gchar *stderr = NULL;
gint exit_status = 0;
exit_status = sd_bus_message_new_method_return(m, &reply);
--- a/src/networkd.c
+++ b/src/networkd.c
@@ -896,7 +896,6 @@ append_wpa_auth_conf(GString* s, const N
static void
write_wpa_unit(const NetplanNetDefinition* def, const char* rootdir)
{
- g_autoptr(GError) err = NULL;
g_autofree gchar *stdouth = NULL;
stdouth = systemd_escape(def->id);
--- a/src/parse.c
+++ b/src/parse.c
@@ -1898,7 +1898,6 @@ handle_wireguard_peers(yaml_document_t*
}
for (yaml_node_item_t *i = node->data.sequence.items.start; i < node->data.sequence.items.top; i++) {
- g_autofree char* addr = NULL;
yaml_node_t *entry = yaml_document_get_node(doc, *i);
assert_type(entry, YAML_MAPPING_NODE);