diff options
author | Thomas Haller <thaller@redhat.com> | 2014-10-29 10:44:31 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-10-29 12:30:11 +0100 |
commit | b77567b2257c6ff3a78d508b332a330671119b65 (patch) | |
tree | e1df91b60884080c90abb8681877e8a1b707e981 | |
parent | 5aefbe56584f5ca4464275dba81d07a51a205297 (diff) | |
download | NetworkManager-b77567b2257c6ff3a78d508b332a330671119b65.tar.gz |
build: fix -Wstrict-prototypes warnings
We disabled -Wstrict-prototypes in commit
db9b1df0e47996ff8aaea468a11e1e97f64ee126 .
Fix compiler warnings.
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | include/nm-test-utils.h | 4 | ||||
-rw-r--r-- | libnm-core/tests/test-general.c | 6 | ||||
-rw-r--r-- | libnm-util/tests/test-general.c | 6 | ||||
-rw-r--r-- | src/nm-logging.c | 2 | ||||
-rw-r--r-- | src/nm-manager.c | 2 | ||||
-rw-r--r-- | src/platform/nm-linux-platform.c | 6 | ||||
-rw-r--r-- | src/platform/tests/test-cleanup.c | 2 | ||||
-rw-r--r-- | src/platform/tests/test-link.c | 2 | ||||
-rw-r--r-- | src/platform/tests/test-route.c | 4 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 2 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-suse/plugin.c | 2 | ||||
-rw-r--r-- | src/settings/plugins/ifnet/connection_parser.c | 4 | ||||
-rw-r--r-- | src/settings/plugins/ifnet/tests/test_all.c | 28 | ||||
-rw-r--r-- | src/settings/plugins/ifnet/wpa_parser.c | 2 | ||||
-rw-r--r-- | src/settings/plugins/keyfile/tests/test-keyfile.c | 4 | ||||
-rw-r--r-- | src/tests/test-general-with-expect.c | 2 | ||||
-rw-r--r-- | src/tests/test-general.c | 2 |
17 files changed, 40 insertions, 40 deletions
diff --git a/include/nm-test-utils.h b/include/nm-test-utils.h index dcac8a697b..11ffd33033 100644 --- a/include/nm-test-utils.h +++ b/include/nm-test-utils.h @@ -365,14 +365,14 @@ nmtst_is_debug (void) #endif inline static GRand * -nmtst_get_rand0 () +nmtst_get_rand0 (void) { g_assert (nmtst_initialized ()); return __nmtst_internal.rand0; } inline static GRand * -nmtst_get_rand () +nmtst_get_rand (void) { g_assert (nmtst_initialized ()); diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c index bc8b0925ea..a71238929f 100644 --- a/libnm-core/tests/test-general.c +++ b/libnm-core/tests/test-general.c @@ -1064,7 +1064,7 @@ new_connection_dict (char **out_uuid, } static void -test_connection_replace_settings () +test_connection_replace_settings (void) { NMConnection *connection; GVariant *new_settings; @@ -1103,7 +1103,7 @@ test_connection_replace_settings () } static void -test_connection_replace_settings_from_connection () +test_connection_replace_settings_from_connection (void) { NMConnection *connection, *replacement; NMSettingConnection *s_con; @@ -1220,7 +1220,7 @@ test_connection_replace_settings_bad (void) } static void -test_connection_new_from_dbus () +test_connection_new_from_dbus (void) { NMConnection *connection; GVariant *new_settings; diff --git a/libnm-util/tests/test-general.c b/libnm-util/tests/test-general.c index 87e29f5977..bdec7e1354 100644 --- a/libnm-util/tests/test-general.c +++ b/libnm-util/tests/test-general.c @@ -744,7 +744,7 @@ new_connection_hash (char **out_uuid, } static void -test_connection_replace_settings () +test_connection_replace_settings (void) { NMConnection *connection; GHashTable *new_settings; @@ -783,7 +783,7 @@ test_connection_replace_settings () } static void -test_connection_replace_settings_from_connection () +test_connection_replace_settings_from_connection (void) { NMConnection *connection, *replacement; GError *error = NULL; @@ -845,7 +845,7 @@ test_connection_replace_settings_from_connection () } static void -test_connection_new_from_hash () +test_connection_new_from_hash (void) { NMConnection *connection; GHashTable *new_settings; diff --git a/src/nm-logging.c b/src/nm-logging.c index 9dbc9f2618..32d8e539e1 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -125,7 +125,7 @@ static const LogDesc domain_descs[] = { /************************************************************************/ static void -_ensure_initialized () +_ensure_initialized (void) { if (G_UNLIKELY (!logging_set_up)) nm_logging_setup ("INFO", "DEFAULT", NULL, NULL); diff --git a/src/nm-manager.c b/src/nm-manager.c index 63ef38822e..459d531a97 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1900,7 +1900,7 @@ read_device_factory_paths_sort_fcn (gconstpointer a, gconstpointer b) } static char** -read_device_factory_paths () +read_device_factory_paths (void) { GDir *dir; GError *error = NULL; diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 603701685d..ef5537d897 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -119,7 +119,7 @@ _nl_f_nl_has_capability (int capability) } static struct libnl_vtable * -_nl_get_vtable () +_nl_get_vtable (void) { static struct libnl_vtable vtable; @@ -281,7 +281,7 @@ _nm_rtnl_addr_alloc (int ifindex) } static struct rtnl_route * -_nm_rtnl_route_alloc () +_nm_rtnl_route_alloc (void) { struct rtnl_route *rtnlroute = rtnl_route_alloc (); @@ -291,7 +291,7 @@ _nm_rtnl_route_alloc () } static struct rtnl_nexthop * -_nm_rtnl_route_nh_alloc () +_nm_rtnl_route_nh_alloc (void) { struct rtnl_nexthop *nexthop; diff --git a/src/platform/tests/test-cleanup.c b/src/platform/tests/test-cleanup.c index 6006ca1f1b..646fb8a8db 100644 --- a/src/platform/tests/test-cleanup.c +++ b/src/platform/tests/test-cleanup.c @@ -3,7 +3,7 @@ #define DEVICE_NAME "nm-test-device" static void -test_cleanup_internal () +test_cleanup_internal (void) { SignalData *link_added = add_signal_ifname (NM_PLATFORM_SIGNAL_LINK_CHANGED, NM_PLATFORM_SIGNAL_ADDED, link_callback, DEVICE_NAME); int ifindex; diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c index 37ba8f4ac8..66ee51a819 100644 --- a/src/platform/tests/test-link.c +++ b/src/platform/tests/test-link.c @@ -380,7 +380,7 @@ test_team (void) } static void -test_vlan () +test_vlan (void) { test_software (NM_LINK_TYPE_VLAN, "vlan"); } diff --git a/src/platform/tests/test-route.c b/src/platform/tests/test-route.c index 4d6c5f09b0..44598f4c78 100644 --- a/src/platform/tests/test-route.c +++ b/src/platform/tests/test-route.c @@ -48,7 +48,7 @@ ip6_route_callback (NMPlatform *platform, int ifindex, NMPlatformIP6Route *recei } static void -test_ip4_route () +test_ip4_route (void) { int ifindex = nm_platform_link_get_ifindex (DEVICE_NAME); SignalData *route_added = add_signal (NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, NM_PLATFORM_SIGNAL_ADDED, ip4_route_callback); @@ -143,7 +143,7 @@ test_ip4_route () } static void -test_ip6_route () +test_ip6_route (void) { int ifindex = nm_platform_link_get_ifindex (DEVICE_NAME); SignalData *route_added = add_signal (NM_PLATFORM_SIGNAL_IP6_ROUTE_CHANGED, NM_PLATFORM_SIGNAL_ADDED, ip6_route_callback); diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 3558f825c5..b2d91e46f6 100644 --- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -13736,7 +13736,7 @@ test_svUnescape_assert (const char *str) } static void -test_svUnescape () +test_svUnescape (void) { int len, repeat, i, k; GRand *r = g_rand_new (); diff --git a/src/settings/plugins/ifcfg-suse/plugin.c b/src/settings/plugins/ifcfg-suse/plugin.c index cf73548d8e..a45ecd523c 100644 --- a/src/settings/plugins/ifcfg-suse/plugin.c +++ b/src/settings/plugins/ifcfg-suse/plugin.c @@ -137,7 +137,7 @@ hostname_is_dynamic (void) } static char * -hostname_read () +hostname_read (void) { GIOChannel *channel; char *hostname = NULL; diff --git a/src/settings/plugins/ifnet/connection_parser.c b/src/settings/plugins/ifnet/connection_parser.c index 380fc4d3b4..f76876f11f 100644 --- a/src/settings/plugins/ifnet/connection_parser.c +++ b/src/settings/plugins/ifnet/connection_parser.c @@ -2884,7 +2884,7 @@ ifnet_can_write_connection (NMConnection *connection, GError **error) /* get the available wired name(eth*). */ static gchar * -get_wired_name () +get_wired_name (void) { int i = 0; @@ -2901,7 +2901,7 @@ get_wired_name () /* get the available pppoe name(ppp*). */ static gchar * -get_ppp_name () +get_ppp_name (void) { int i = 0; diff --git a/src/settings/plugins/ifnet/tests/test_all.c b/src/settings/plugins/ifnet/tests/test_all.c index c320ed5f8f..163cf6ede3 100644 --- a/src/settings/plugins/ifnet/tests/test_all.c +++ b/src/settings/plugins/ifnet/tests/test_all.c @@ -55,7 +55,7 @@ nm_config_get_dhcp_client (NMConfig *config) } static void -test_getdata () +test_getdata (void) { ASSERT (ifnet_get_data ("eth1", "config") && strcmp (ifnet_get_data ("eth1", "config"), "( \"dhcp\" )") == 0, @@ -103,7 +103,7 @@ test_write_hostname (const char *temp_path) } static void -test_is_static () +test_is_static (void) { ASSERT (is_static_ip4 ("eth1") == FALSE, "is static", "a dhcp interface is recognized as static"); @@ -114,7 +114,7 @@ test_is_static () } static void -test_has_default_route () +test_has_default_route (void) { ASSERT (has_default_ip4_route ("eth0"), "has default route", "eth0 should have a default ipv4 route"); @@ -126,7 +126,7 @@ test_has_default_route () } static void -test_has_ip6_address () +test_has_ip6_address (void) { ASSERT (has_ip6_address ("eth2"), "has ip6 address", "eth2 should have a ipv6 address"); @@ -136,7 +136,7 @@ test_has_ip6_address () } static void -test_is_ip4_address () +test_is_ip4_address (void) { gchar *address1 = "192.168.4.232/24"; gchar *address2 = "192.168.100.{1..254}/24"; @@ -151,7 +151,7 @@ test_is_ip4_address () } static void -test_is_ip6_address () +test_is_ip6_address (void) { gchar *address1 = "4321:0:1:2:3:4:567:89ac/24"; @@ -182,7 +182,7 @@ check_ip_block (ip_block * iblock, gchar * ip, gchar * netmask, gchar * gateway) } static void -test_convert_ipv4_config_block () +test_convert_ipv4_config_block (void) { ip_block *iblock = convert_ip4_config_block ("eth0"); ip_block *tmp = iblock; @@ -218,7 +218,7 @@ test_convert_ipv4_config_block () } static void -test_convert_ipv4_routes_block () +test_convert_ipv4_routes_block (void) { ip_block *iblock = convert_ip4_routes_block ("eth0"); ip_block *tmp = iblock; @@ -242,7 +242,7 @@ test_convert_ipv4_routes_block () } static void -test_wpa_parser () +test_wpa_parser (void) { const char *value; @@ -261,7 +261,7 @@ test_wpa_parser () } static void -test_strip_string () +test_strip_string (void) { gchar *str = "( \"default via 202.117.16.1\" )"; gchar *result = g_strdup (str); @@ -277,7 +277,7 @@ test_strip_string () } static void -test_is_unmanaged () +test_is_unmanaged (void) { ASSERT (is_managed ("eth0"), "test_is_unmanaged", "eth0 should be managed"); @@ -286,7 +286,7 @@ test_is_unmanaged () } static void -test_new_connection () +test_new_connection (void) { GError *error = NULL; NMConnection *connection; @@ -409,7 +409,7 @@ test_add_connection (const char *basepath) } static void -test_delete_connection () +test_delete_connection (void) { GError *error = NULL; NMConnection *connection; @@ -438,7 +438,7 @@ test_delete_connection () } static void -test_missing_config () +test_missing_config (void) { GError *error = NULL; NMConnection *connection; diff --git a/src/settings/plugins/ifnet/wpa_parser.c b/src/settings/plugins/ifnet/wpa_parser.c index 748eb351d0..02d7ea8e6d 100644 --- a/src/settings/plugins/ifnet/wpa_parser.c +++ b/src/settings/plugins/ifnet/wpa_parser.c @@ -166,7 +166,7 @@ add_one_wep_key (GHashTable * table, int key_num, gchar * one_wep_key) /* Reading wep security information from /etc/conf.d/net. * This should not be used in future, use wpa_supplicant instead. */ static void -add_keys_from_net () +add_keys_from_net (void) { GList *names = ifnet_get_connection_names (); GList *iter = names; diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c index a0d6e3b2c4..e37f7c8a90 100644 --- a/src/settings/plugins/keyfile/tests/test-keyfile.c +++ b/src/settings/plugins/keyfile/tests/test-keyfile.c @@ -3364,7 +3364,7 @@ test_read_missing_id_uuid (void) } static void -test_read_minimal () +test_read_minimal (void) { NMConnection *connection = NULL; gs_unref_object NMConnection *con_archetype = NULL; @@ -3396,7 +3396,7 @@ test_read_minimal () } static void -test_read_minimal_slave () +test_read_minimal_slave (void) { NMConnection *connection = NULL; gs_unref_object NMConnection *con_archetype = NULL; diff --git a/src/tests/test-general-with-expect.c b/src/tests/test-general-with-expect.c index f9dedbfef9..50cc48668d 100644 --- a/src/tests/test-general-with-expect.c +++ b/src/tests/test-general-with-expect.c @@ -125,7 +125,7 @@ test_nm_utils_kill_child_spawn (char **argv, gboolean do_not_reap_child) } static pid_t -test_nm_utils_kill_child_create_and_join_pgroup () +test_nm_utils_kill_child_create_and_join_pgroup (void) { int err, tmp = 0; int pipefd[2]; diff --git a/src/tests/test-general.c b/src/tests/test-general.c index 93a2500650..e6bc207bd7 100644 --- a/src/tests/test-general.c +++ b/src/tests/test-general.c @@ -229,7 +229,7 @@ test_nm_utils_ip6_address_clear_host_address (void) static void -test_nm_utils_log_connection_diff() +test_nm_utils_log_connection_diff (void) { NMConnection *connection; NMConnection *connection2; |