From 1e1436ce75b86e4ffaf45c56e439b3f646beb9c0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 8 May 2022 09:57:04 +0200 Subject: [PATCH] stats: Functions with no arguments should specify(void) ... otherwise callers might pass arbitrary arguments without raising a compiler error or warning. Change-Id: Ia2de1d13df5f00dcc42493090734a635029d76b5 --- include/osmocom/core/stats.h | 2 +- src/stats.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h index 6544dfa87..a034a6164 100644 --- a/include/osmocom/core/stats.h +++ b/include/osmocom/core/stats.h @@ -108,7 +108,7 @@ extern struct llist_head osmo_stats_reporter_list; extern struct osmo_stats_config *osmo_stats_config; void osmo_stats_init(void *ctx); -int osmo_stats_report(); +int osmo_stats_report(void); int osmo_stats_set_interval(int interval); diff --git a/src/stats.c b/src/stats.c index 4267284b4..7b25ab1c6 100644 --- a/src/stats.c +++ b/src/stats.c @@ -175,7 +175,7 @@ static int osmo_stats_timer_cb(struct osmo_fd *ofd, unsigned int what) return 0; } -static int start_timer() +static int start_timer(void) { int rc; int interval = osmo_stats_config->interval; @@ -758,7 +758,7 @@ static int handle_counter(struct osmo_counter *counter, void *sctx_) /*** main reporting function ***/ -static void flush_all_reporters() +static void flush_all_reporters(void) { struct osmo_stats_reporter *srep; @@ -781,7 +781,7 @@ static void flush_all_reporters() } } -int osmo_stats_report() +int osmo_stats_report(void) { /* per group actions */ TRACE(LIBOSMOCORE_STATS_START());