From cb365b33f3271d4cac8192f5434c672c29e01b64 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 6 Feb 2017 18:43:24 +0100 Subject: [PATCH] build: fix -Wold-style-declaration warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libnm-core/nm-setting-bond.c:502:1: error: ‘static’ is not at beginning of declaration [-Werror=old-style-declaration] const static struct { ^~~~~ In file included from clients/cli/common.c:32:0: ./clients/common/nm-vpn-helpers.h:27:1: error: ‘typedef’ is not at beginning of declaration [-Werror=old-style-declaration] } typedef VpnPasswordName; ^ --- clients/common/nm-vpn-helpers.h | 4 ++-- libnm-core/nm-setting-bond.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/common/nm-vpn-helpers.h b/clients/common/nm-vpn-helpers.h index 9c23f37c5..9ad6b3b61 100644 --- a/clients/common/nm-vpn-helpers.h +++ b/clients/common/nm-vpn-helpers.h @@ -21,10 +21,10 @@ #include -struct { +typedef struct { const char *name; const char *ui_name; -} typedef VpnPasswordName; +} VpnPasswordName; GSList *nm_vpn_get_plugin_infos (void); diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c index a01adc12b..904ebbfc6 100644 --- a/libnm-core/nm-setting-bond.c +++ b/libnm-core/nm-setting-bond.c @@ -499,7 +499,7 @@ _nm_setting_bond_mode_from_string (const char *str) #define BIT(x) (1 << (x)) -const static struct { +static const struct { const char *option; NMBondMode unsupp_modes; } bond_unsupp_modes[] = {