blob: dfc6f90c4c6f6ac5f810de5d903f900cf7e85f37 [file] [log] [blame]
Andrew Geissler69721092021-07-23 12:57:00 -04001From 6d284f1ff81494a5fca91a399b92b218ea1a9ea8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 8 Jun 2021 08:53:30 -0700
4Subject: [PATCH] Handle enum element override
5
6NETPLAN_DEF_TYPE_VIRTUAL and NETPLAN_DEF_TYPE_BRIDGE point
7to same value in enum, however here they are assigned individually
8which results in overriding the initialization of the objects
9
10Fixes
11src/netplan.h:85:33: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
12 [NETPLAN_DEF_TYPE_BRIDGE] = "bridges",
13 ^~~~~~~~~
14Upstream-Status: Submitted [https://github.com/canonical/netplan/pull/213]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 src/netplan.h | 1 -
18 1 file changed, 1 deletion(-)
19
20diff --git a/src/netplan.h b/src/netplan.h
21index d2c538b..26574f8 100644
22--- a/src/netplan.h
23+++ b/src/netplan.h
24@@ -81,7 +81,6 @@ static const char* const netplan_def_type_to_str[NETPLAN_DEF_TYPE_MAX_] = {
25 [NETPLAN_DEF_TYPE_ETHERNET] = "ethernets",
26 [NETPLAN_DEF_TYPE_WIFI] = "wifis",
27 [NETPLAN_DEF_TYPE_MODEM] = "modems",
28- [NETPLAN_DEF_TYPE_VIRTUAL] = NULL,
29 [NETPLAN_DEF_TYPE_BRIDGE] = "bridges",
30 [NETPLAN_DEF_TYPE_BOND] = "bonds",
31 [NETPLAN_DEF_TYPE_VLAN] = "vlans",
32--
332.32.0
34