Commit b77567b2 authored by Thomas Haller's avatar Thomas Haller

build: fix -Wstrict-prototypes warnings

We disabled -Wstrict-prototypes in commit
db9b1df0 .
Fix compiler warnings.
Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
parent 5aefbe56
......@@ -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 ());
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -380,7 +380,7 @@ test_team (void)
}
static void
test_vlan ()
test_vlan (void)
{
test_software (NM_LINK_TYPE_VLAN, "vlan");
}
......
......@@ -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);
......
......@@ -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 ();
......
......@@ -137,7 +137,7 @@ hostname_is_dynamic (void)
}
static char *
hostname_read ()
hostname_read (void)
{
GIOChannel *channel;
char *hostname = NULL;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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];
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment