aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch
blob: 407e24ca0ef92d920089ab9fa9093d2eaf7403d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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(-)

diff --git a/src/dbus.c b/src/dbus.c
index 9606fea..8e1ed9d 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -242,9 +242,6 @@ 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);
diff --git a/src/networkd.c b/src/networkd.c
index 7c86cd6..7200740 100644
--- a/src/networkd.c
+++ b/src/networkd.c
@@ -897,7 +897,6 @@ append_wpa_auth_conf(GString* s, const NetplanAuthenticationSettings* auth, cons
 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);
diff --git a/src/parse.c b/src/parse.c
index 033c657..faca27f 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1899,7 +1899,6 @@ handle_wireguard_peers(yaml_document_t* doc, yaml_node_t* node, const void* _, G
     }
 
     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);
 
-- 
2.25.1