all: fix a compiler warning about function declarations

warning: function declaration isn’t a prototype [-Wstrict-prototypes]

In C function() and function(void) are two different prototypes (as opposed to
C++).
function()     accepts an arbitrary number of arguments
function(void) accepts zero arguments

(cherry picked from commit 94a393e9ed)
This commit is contained in:
Jiří Klimeš 2015-06-10 10:01:49 +02:00 committed by Thomas Haller
parent c7a343117f
commit 60080377a2
5 changed files with 8 additions and 8 deletions

View file

@ -102,7 +102,7 @@ test_defaults (GType type, const char *name)
}
static void
defaults ()
defaults (void)
{
/* The tests */
test_defaults (NM_TYPE_SETTING_CONNECTION, NM_SETTING_CONNECTION_SETTING_NAME);

View file

@ -164,7 +164,7 @@ parse_state_file (const char *filename,
}
static void
_set_g_fatal_warnings ()
_set_g_fatal_warnings (void)
{
GLogLevelFlags fatal_mask;

View file

@ -325,7 +325,7 @@ static int _support_user_ipv6ll = 0;
#endif
static gboolean
_support_user_ipv6ll_get ()
_support_user_ipv6ll_get (void)
{
#if HAVE_LIBNL_INET6_ADDR_GEN_MODE
if (G_UNLIKELY (_support_user_ipv6ll == 0)) {
@ -391,7 +391,7 @@ _support_kernel_extended_ifa_flags_detect (struct nl_msg *msg)
}
static gboolean
_support_kernel_extended_ifa_flags_get ()
_support_kernel_extended_ifa_flags_get (void)
{
if (_support_kernel_extended_ifa_flags_still_undecided ()) {
nm_log_warn (LOGD_PLATFORM, "Unable to detect kernel support for extended IFA_FLAGS. Assume no kernel support.");

View file

@ -12,7 +12,7 @@
gboolean
nmtst_platform_is_root_test ()
nmtst_platform_is_root_test (void)
{
NM_PRAGMA_WARNING_DISABLE("-Wtautological-compare")
return (SETUP == nm_linux_platform_setup);
@ -20,7 +20,7 @@ nmtst_platform_is_root_test ()
}
gboolean
nmtst_platform_is_sysfs_writable ()
nmtst_platform_is_sysfs_writable (void)
{
return !nmtst_platform_is_root_test ()
|| (access ("/sys/devices", W_OK) == 0);
@ -271,7 +271,7 @@ run_command (const char *format, ...)
NMTST_DEFINE();
static gboolean
unshare_user ()
unshare_user (void)
{
FILE *f;
uid_t uid = geteuid ();

View file

@ -334,7 +334,7 @@ test_nm_utils_kill_child (void)
/*******************************************/
static void
test_nm_ethernet_address_is_valid ()
test_nm_ethernet_address_is_valid (void)
{
g_assert (!nm_ethernet_address_is_valid (NULL, -1));
g_assert (!nm_ethernet_address_is_valid (NULL, ETH_ALEN));