diff options
| author | Michael Biebl <biebl@debian.org> | 2011-03-11 14:47:29 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2011-03-11 14:47:29 +0100 |
| commit | d7e8ca5aac789d0c2e40c6fde6e80903c7ed24a9 (patch) | |
| tree | cfdcf8f90e94950f55473c544aa3daa898379beb | |
| parent | 43d693464a455e78329174694aed94c7c45d5521 (diff) | |
Fix build failure with more-warnings enabled
Don't mix code and declaration.
| -rw-r--r-- | debian/patches/50-bridge-interfaces.patch | 16 | ||||
| -rw-r--r-- | debian/patches/51-normalized-keys.patch | 14 |
2 files changed, 16 insertions, 14 deletions
diff --git a/debian/patches/50-bridge-interfaces.patch b/debian/patches/50-bridge-interfaces.patch index f58ba5d7..de243fbb 100644 --- a/debian/patches/50-bridge-interfaces.patch +++ b/debian/patches/50-bridge-interfaces.patch @@ -1,8 +1,8 @@ Index: network-manager/system-settings/plugins/ifupdown/plugin.c =================================================================== ---- network-manager.orig/system-settings/plugins/ifupdown/plugin.c 2010-12-04 16:41:38.000000000 +0100 -+++ network-manager/system-settings/plugins/ifupdown/plugin.c 2010-12-04 16:51:51.810906877 +0100 -@@ -360,9 +360,49 @@ +--- network-manager.orig/system-settings/plugins/ifupdown/plugin.c 2011-03-11 14:47:00.272832466 +0100 ++++ network-manager/system-settings/plugins/ifupdown/plugin.c 2011-03-11 14:47:01.272832466 +0100 +@@ -360,9 +360,51 @@ while (block) { if(!strcmp ("auto", block->type) || !strcmp ("allow-hotplug", block->type)) g_hash_table_insert (auto_ifaces, block->name, GUINT_TO_POINTER (1)); @@ -15,11 +15,13 @@ Index: network-manager/system-settings/plugins/ifupdown/plugin.c + /* Try to find bridge ports */ + const char *ports = ifparser_getkey (block, "bridge_ports"); + if (ports) { -+ PLUGIN_PRINT("SCPlugin-Ifupdown", "found bridge ports %s for %s", ports, block->name); -+ char **port_ifaces = g_strsplit_set (ports, " \t", -1); -+ + int i; + int state = 0; ++ char **port_ifaces; ++ ++ PLUGIN_PRINT("SCPlugin-Ifupdown", "found bridge ports %s for %s", ports, block->name); ++ ++ port_ifaces = g_strsplit_set (ports, " \t", -1); + for (i = 0; i < g_strv_length (port_ifaces); i++) { + char *token = port_ifaces[i]; + /* Skip crazy stuff like regex or all */ @@ -53,7 +55,7 @@ Index: network-manager/system-settings/plugins/ifupdown/plugin.c /* Remove any connection for this block that was previously found */ exported = g_hash_table_lookup (priv->iface_connections, block->name); if (exported) { -@@ -385,6 +425,7 @@ +@@ -385,6 +427,7 @@ g_hash_table_insert (priv->well_known_interfaces, block->name, "known"); PLUGIN_PRINT("SCPlugin-Ifupdown", "adding mapping %s to well_known_interfaces", block->name); } diff --git a/debian/patches/51-normalized-keys.patch b/debian/patches/51-normalized-keys.patch index 8411ca8b..750eb135 100644 --- a/debian/patches/51-normalized-keys.patch +++ b/debian/patches/51-normalized-keys.patch @@ -1,7 +1,7 @@ Index: network-manager/system-settings/plugins/ifupdown/interface_parser.c =================================================================== ---- network-manager.orig/system-settings/plugins/ifupdown/interface_parser.c 2011-03-06 20:49:32.229089569 +0100 -+++ network-manager/system-settings/plugins/ifupdown/interface_parser.c 2011-03-06 20:53:09.749089571 +0100 +--- network-manager.orig/system-settings/plugins/ifupdown/interface_parser.c 2011-03-11 14:38:52.996832466 +0100 ++++ network-manager/system-settings/plugins/ifupdown/interface_parser.c 2011-03-11 14:47:12.580832465 +0100 @@ -51,6 +51,7 @@ void add_data(const char *key,const char *data) { @@ -24,14 +24,14 @@ Index: network-manager/system-settings/plugins/ifupdown/interface_parser.c if (last->info == NULL) Index: network-manager/system-settings/plugins/ifupdown/plugin.c =================================================================== ---- network-manager.orig/system-settings/plugins/ifupdown/plugin.c 2011-03-06 20:49:36.721089570 +0100 -+++ network-manager/system-settings/plugins/ifupdown/plugin.c 2011-03-06 20:50:13.493089573 +0100 -@@ -368,7 +368,7 @@ +--- network-manager.orig/system-settings/plugins/ifupdown/plugin.c 2011-03-11 14:47:01.272832466 +0100 ++++ network-manager/system-settings/plugins/ifupdown/plugin.c 2011-03-11 14:47:12.580832465 +0100 +@@ -366,7 +366,7 @@ /* Bridge configuration */ if(!strncmp ("br", block->name, 2)) { /* Try to find bridge ports */ - const char *ports = ifparser_getkey (block, "bridge_ports"); + const char *ports = ifparser_getkey (block, "bridge-ports"); if (ports) { - PLUGIN_PRINT("SCPlugin-Ifupdown", "found bridge ports %s for %s", ports, block->name); - char **port_ifaces = g_strsplit_set (ports, " \t", -1); + int i; + int state = 0; |