diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-06-10 10:01:49 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-06-10 10:01:49 +0200 |
commit | 94a393e9ed453615360f41ffd931cc83fd01fbee (patch) | |
tree | 56d52efe0c3aaac0563cf3c6a0685a9a8a3e56cc | |
parent | 036901b82e1e8386dae0ec7c05a25877da1cab32 (diff) | |
download | NetworkManager-94a393e9ed453615360f41ffd931cc83fd01fbee.tar.gz |
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
-rw-r--r-- | libnm-core/tests/test-settings-defaults.c | 2 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/platform/nm-linux-platform.c | 4 | ||||
-rw-r--r-- | src/platform/tests/test-common.c | 6 | ||||
-rw-r--r-- | src/tests/test-general-with-expect.c | 6 |
5 files changed, 10 insertions, 10 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 b9ab906f0f..61e58a8ad5 100644 --- a/src/main.c +++ b/src/main.c @@ -160,7 +160,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 f559791b14..f1b863e1e9 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 304543df58..9491801d42 100644 --- a/src/tests/test-general-with-expect.c +++ b/src/tests/test-general-with-expect.c @@ -35,7 +35,7 @@ /*******************************************/ static void -test_nm_utils_monotonic_timestamp_as_boottime () +test_nm_utils_monotonic_timestamp_as_boottime (void) { gint64 timestamp_ns_per_tick, now, now_boottime, now_boottime_2, now_boottime_3; struct timespec tp; @@ -420,7 +420,7 @@ _remove_at_indexes_init_random_idx (GArray *idx, guint array_len, guint idx_len) } static void -test_nm_utils_array_remove_at_indexes () +test_nm_utils_array_remove_at_indexes (void) { gs_unref_array GArray *idx = NULL, *array = NULL; gs_unref_hashtable GHashTable *unique = NULL; @@ -468,7 +468,7 @@ test_nm_utils_array_remove_at_indexes () /*******************************************/ 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)); |