aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-05-08 09:57:04 +0200
committerHarald Welte <laforge@osmocom.org>2022-05-08 09:57:04 +0200
commit1e1436ce75b86e4ffaf45c56e439b3f646beb9c0 (patch)
tree76a909c41c7b902b985703cf75aac7010c50a5f9
parentgsm_12_21.h: Add header description pointing to TS files (diff)
downloadlibosmocore-1e1436ce75b86e4ffaf45c56e439b3f646beb9c0.tar.xz
libosmocore-1e1436ce75b86e4ffaf45c56e439b3f646beb9c0.zip
stats: Functions with no arguments should specify(void)
... otherwise callers might pass arbitrary arguments without raising a compiler error or warning. Change-Id: Ia2de1d13df5f00dcc42493090734a635029d76b5
-rw-r--r--include/osmocom/core/stats.h2
-rw-r--r--src/stats.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h
index 6544dfa8..a034a616 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 4267284b..7b25ab1c 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());