aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/netplan/netplan/0001-Handle-enum-element-override.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-06-08 09:04:45 -0700
committerKhem Raj <raj.khem@gmail.com>2021-06-09 08:49:20 -0700
commit236e2d738a4e158a17b35fcb4d8a44d067b7d4c5 (patch)
treee477376f2eeaf4d4fa1cdc3c9bded147d4c018fa /meta-networking/recipes-connectivity/netplan/netplan/0001-Handle-enum-element-override.patch
parentd612ad6f3291b00afc55f6e645de9c83d81d6a27 (diff)
downloadmeta-openembedded-contrib-236e2d738a4e158a17b35fcb4d8a44d067b7d4c5.tar.gz
netplan: Fix a warning with clang
Refresh musl patch to avoid fuzz Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Zang Ruochen <zangrc.fnst@fujitsu.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/netplan/netplan/0001-Handle-enum-element-override.patch')
-rw-r--r--meta-networking/recipes-connectivity/netplan/netplan/0001-Handle-enum-element-override.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/netplan/netplan/0001-Handle-enum-element-override.patch b/meta-networking/recipes-connectivity/netplan/netplan/0001-Handle-enum-element-override.patch
new file mode 100644
index 0000000000..dfc6f90c4c
--- /dev/null
+++ b/meta-networking/recipes-connectivity/netplan/netplan/0001-Handle-enum-element-override.patch
@@ -0,0 +1,34 @@
+From 6d284f1ff81494a5fca91a399b92b218ea1a9ea8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Jun 2021 08:53:30 -0700
+Subject: [PATCH] Handle enum element override
+
+NETPLAN_DEF_TYPE_VIRTUAL and NETPLAN_DEF_TYPE_BRIDGE point
+to same value in enum, however here they are assigned individually
+which results in overriding the initialization of the objects
+
+Fixes
+src/netplan.h:85:33: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
+ [NETPLAN_DEF_TYPE_BRIDGE] = "bridges",
+ ^~~~~~~~~
+Upstream-Status: Submitted [https://github.com/canonical/netplan/pull/213]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/netplan.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/netplan.h b/src/netplan.h
+index d2c538b..26574f8 100644
+--- a/src/netplan.h
++++ b/src/netplan.h
+@@ -81,7 +81,6 @@ static const char* const netplan_def_type_to_str[NETPLAN_DEF_TYPE_MAX_] = {
+ [NETPLAN_DEF_TYPE_ETHERNET] = "ethernets",
+ [NETPLAN_DEF_TYPE_WIFI] = "wifis",
+ [NETPLAN_DEF_TYPE_MODEM] = "modems",
+- [NETPLAN_DEF_TYPE_VIRTUAL] = NULL,
+ [NETPLAN_DEF_TYPE_BRIDGE] = "bridges",
+ [NETPLAN_DEF_TYPE_BOND] = "bonds",
+ [NETPLAN_DEF_TYPE_VLAN] = "vlans",
+--
+2.32.0
+