Support building with -Werror=strict-prototypes / -Werror=old-style-definition
Unfortunately "-std=c99" is not sufficient to make gcc ignore code that
uses constructs of earlier C standards, which were abandoned in C99.
See https://lwn.net/ml/fedora-devel/Y1kvF35WozzGBpc8@redhat.com/ for
some related discussion.
Change-Id: I84fd99442d0cc400fa562fa33623c142649230e2
diff --git a/src/counter.c b/src/counter.c
index cbee7b9..dace15f 100644
--- a/src/counter.c
+++ b/src/counter.c
@@ -75,7 +75,7 @@
/*! Counts the registered counter
* \returns amount of counters */
-int osmo_counters_count()
+int osmo_counters_count(void)
{
return llist_count(&counters);
}
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index c967f73..7abef80 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -1428,7 +1428,7 @@
/*!
* \brief Flush the queues of all BSSGP contexts.
*/
-void bssgp_flush_all_queues()
+void bssgp_flush_all_queues(void)
{
struct bssgp_bvc_ctx *bctx;
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index e057832..89a8874 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -418,7 +418,7 @@
/*! Create BSSMAP Classmark Request message
* \returns callee-allocated msgb with BSSMAP Classmark Request message */
-struct msgb *gsm0808_create_classmark_request()
+struct msgb *gsm0808_create_classmark_request(void)
{
struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM,
"classmark-request");
@@ -1110,7 +1110,7 @@
/*! Create BSSMAP HANDOVER DETECT message, 3GPP TS 48.008 3.2.1.40.
* Sent from the MT BSC back to the MSC when the MS has sent a handover RACH request and the MT BSC has
* received the Handover Detect message. */
-struct msgb *gsm0808_create_handover_detect()
+struct msgb *gsm0808_create_handover_detect(void)
{
struct msgb *msg;
@@ -1129,7 +1129,7 @@
/*! Create BSSMAP HANDOVER SUCCEEDED message, 3GPP TS 48.008 3.2.1.13.
* Sent from the MSC back to the old BSS to notify that the MS has successfully accessed the new BSS. */
-struct msgb *gsm0808_create_handover_succeeded()
+struct msgb *gsm0808_create_handover_succeeded(void)
{
struct msgb *msg;
diff --git a/src/select.c b/src/select.c
index 735ea3e..5aee7d8 100644
--- a/src/select.c
+++ b/src/select.c
@@ -653,20 +653,20 @@
* }
* }
*/
-void osmo_select_shutdown_request()
+void osmo_select_shutdown_request(void)
{
_osmo_select_shutdown_requested++;
};
/*! Return the number of times osmo_select_shutdown_request() was called before. */
-int osmo_select_shutdown_requested()
+int osmo_select_shutdown_requested(void)
{
return _osmo_select_shutdown_requested;
};
/*! Return true after osmo_select_shutdown_requested() was called, and after an osmo_select poll loop found no more
* pending OSMO_FD_WRITE on any registered socket. */
-bool osmo_select_shutdown_done() {
+bool osmo_select_shutdown_done(void) {
return _osmo_select_shutdown_done;
};
diff --git a/src/time_cc.c b/src/time_cc.c
index 05971fe..0e6879e 100644
--- a/src/time_cc.c
+++ b/src/time_cc.c
@@ -49,7 +49,7 @@
OSMO_MIN((TIME_CC)->cfg.round_threshold_usec, GRAN_USEC(TIME_CC)) \
: (GRAN_USEC(TIME_CC) / 2))
-static uint64_t time_now_usec()
+static uint64_t time_now_usec(void)
{
struct timespec tp;
if (osmo_clock_gettime(CLOCK_MONOTONIC, &tp))
diff --git a/src/vty/cpu_sched_vty.c b/src/vty/cpu_sched_vty.c
index dbb3cd5..301e7a6 100644
--- a/src/vty/cpu_sched_vty.c
+++ b/src/vty/cpu_sched_vty.c
@@ -89,7 +89,7 @@
};
/* returns number of configured CPUs in the system, or negative otherwise */
-static int get_num_cpus() {
+static int get_num_cpus(void) {
static unsigned int num_cpus = 0;
long ln;
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index c83dafd..59c8a9c 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -1196,7 +1196,7 @@
/*! Register logging related commands to the VTY. Call this once from
* your application if you want to support those commands. */
-void logging_vty_add_cmds()
+void logging_vty_add_cmds(void)
{
install_lib_element_ve(&enable_logging_cmd);
install_lib_element_ve(&disable_logging_cmd);
diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index e5acfa2..299ec24 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -742,7 +742,7 @@
* Call this once during your application initialization if you would
* like to have stats VTY commands enabled.
*/
-void osmo_stats_vty_add_cmds()
+void osmo_stats_vty_add_cmds(void)
{
install_lib_element_ve(&show_stats_cmd);
install_lib_element_ve(&show_stats_level_cmd);