From 60080377a2c0a390e367abc5d9403dc458313782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 10 Jun 2015 10:01:49 +0200 Subject: [PATCH] all: fix a compiler warning about function declarations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 94a393e9ed453615360f41ffd931cc83fd01fbee) --- libnm-core/tests/test-settings-defaults.c | 2 +- src/main.c | 2 +- src/platform/nm-linux-platform.c | 4 ++-- src/platform/tests/test-common.c | 6 +++--- src/tests/test-general-with-expect.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libnm-core/tests/test-settings-defaults.c b/libnm-core/tests/test-settings-defaults.c index ace7af694d..7d7715cbb3 100644 --- a/libnm-core/tests/test-settings-defaults.c +++ b/libnm-core/tests/test-settings-defaults.c @@ -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); diff --git a/src/main.c b/src/main.c index 32ed099909..71c8f0d5c1 100644 --- a/src/main.c +++ b/src/main.c @@ -164,7 +164,7 @@ parse_state_file (const char *filename, } static void -_set_g_fatal_warnings () +_set_g_fatal_warnings (void) { GLogLevelFlags fatal_mask; diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 88f27aab0f..249c0484c6 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -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."); diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c index 8b4eb0465a..196a9be2e7 100644 --- a/src/platform/tests/test-common.c +++ b/src/platform/tests/test-common.c @@ -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 (); diff --git a/src/tests/test-general-with-expect.c b/src/tests/test-general-with-expect.c index 4a0627c9a0..286efe1491 100644 --- a/src/tests/test-general-with-expect.c +++ b/src/tests/test-general-with-expect.c @@ -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));