laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/29982 )
Change subject: iSupport building with -Werror=strict-prototypes /
-Werror=old-style-definition
......................................................................
iSupport building with -Werror=strict-prototypes / -Werror=old-style-definition
Unfortunately "-std=c99" is not sufficient to make gcc ignore cold 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: Ic92aa70d569778a776f4c5d24c455f71fd50b61b
---
M include/osmocom/bsc/assignment_fsm.h
M include/osmocom/bsc/bsc_stats.h
M include/osmocom/bsc/bsc_subscr_conn_fsm.h
M include/osmocom/bsc/chan_counts.h
M include/osmocom/bsc/handover_fsm.h
M include/osmocom/bsc/handover_vty.h
M include/osmocom/bsc/lb.h
M include/osmocom/bsc/lchan_fsm.h
M include/osmocom/bsc/neighbor_ident.h
M include/osmocom/bsc/osmo_bsc.h
M src/ipaccess/abisip-find.c
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/bsc_stats.c
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/bssmap_reset.c
M src/osmo-bsc/chan_counts.c
M src/osmo-bsc/handover_fsm.c
M src/osmo-bsc/handover_vty.c
M src/osmo-bsc/lb.c
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
M src/osmo-bsc/neighbor_ident.c
M src/osmo-bsc/neighbor_ident_vty.c
M src/osmo-bsc/osmo_bsc_main.c
24 files changed, 41 insertions(+), 40 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/82/29982/1
diff --git a/include/osmocom/bsc/assignment_fsm.h b/include/osmocom/bsc/assignment_fsm.h
index 98bec42..3dffaf2 100644
--- a/include/osmocom/bsc/assignment_fsm.h
+++ b/include/osmocom/bsc/assignment_fsm.h
@@ -40,7 +40,7 @@
ASSIGNMENT_EV_CONN_RELEASING,
};
-void assignment_fsm_init();
+void assignment_fsm_init(void);
int reassignment_request_to_lchan(enum assign_for assign_for, struct gsm_lchan *lchan,
struct gsm_lchan *to_lchan,
int tsc_set, int tsc);
diff --git a/include/osmocom/bsc/bsc_stats.h b/include/osmocom/bsc/bsc_stats.h
index e8837aa..eae9750 100644
--- a/include/osmocom/bsc/bsc_stats.h
+++ b/include/osmocom/bsc/bsc_stats.h
@@ -113,4 +113,4 @@
void bsc_update_connection_stats(struct gsm_network *net);
void all_allocated_update_bts(struct gsm_bts *bts);
-void all_allocated_update_bsc();
+void all_allocated_update_bsc(void);
diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h
b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
index 0ab4843..b358da6 100644
--- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h
+++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
@@ -57,7 +57,7 @@
struct assignment_request;
struct gsm_lchan;
-void bsc_subscr_conn_fsm_init();
+void bsc_subscr_conn_fsm_init(void);
/* Allocate a subscriber connection and its associated FSM */
struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *net);
diff --git a/include/osmocom/bsc/chan_counts.h b/include/osmocom/bsc/chan_counts.h
index c11473e..a830e87 100644
--- a/include/osmocom/bsc/chan_counts.h
+++ b/include/osmocom/bsc/chan_counts.h
@@ -6,11 +6,11 @@
struct gsm_bts_trx_ts;
struct gsm_lchan;
-void chan_counts_sig_init();
+void chan_counts_sig_init(void);
void chan_counts_ts_update(struct gsm_bts_trx_ts *ts);
void chan_counts_ts_clear(struct gsm_bts_trx_ts *ts);
void chan_counts_trx_update(struct gsm_bts_trx *trx);
-void chan_counts_bsc_verify();
+void chan_counts_bsc_verify(void);
/* First array index to chan_counts.val. */
enum chan_counts_dim1 {
diff --git a/include/osmocom/bsc/handover_fsm.h b/include/osmocom/bsc/handover_fsm.h
index 052e09d..faec73f 100644
--- a/include/osmocom/bsc/handover_fsm.h
+++ b/include/osmocom/bsc/handover_fsm.h
@@ -55,7 +55,7 @@
const uint8_t *access_delay;
};
-void handover_fsm_init();
+void handover_fsm_init(void);
int handover_request(struct handover_out_req *req);
void handover_start(struct handover_out_req *req);
diff --git a/include/osmocom/bsc/handover_vty.h b/include/osmocom/bsc/handover_vty.h
index 6ad5276..1dd8bf0 100644
--- a/include/osmocom/bsc/handover_vty.h
+++ b/include/osmocom/bsc/handover_vty.h
@@ -3,6 +3,6 @@
#include <osmocom/vty/vty.h>
#include <osmocom/bsc/handover_cfg.h>
-void ho_vty_init();
+void ho_vty_init(void);
void ho_vty_write_net(struct vty *vty, struct gsm_network *net);
void ho_vty_write_bts(struct vty *vty, struct gsm_bts *bts);
diff --git a/include/osmocom/bsc/lb.h b/include/osmocom/bsc/lb.h
index dbea0b0..08206d4 100644
--- a/include/osmocom/bsc/lb.h
+++ b/include/osmocom/bsc/lb.h
@@ -57,7 +57,7 @@
extern const struct rate_ctr_desc smlc_ctr_description[];
extern const struct rate_ctr_group_desc smlc_ctrg_desc;
-int lb_init();
-int lb_start_or_stop();
+int lb_init(void);
+int lb_start_or_stop(void);
int lb_send(struct gsm_subscriber_connection *conn, const struct bssap_le_pdu
*bssap_le);
void lb_close_conn(struct gsm_subscriber_connection *conn);
diff --git a/include/osmocom/bsc/lchan_fsm.h b/include/osmocom/bsc/lchan_fsm.h
index b9ffb22..cc231dc 100644
--- a/include/osmocom/bsc/lchan_fsm.h
+++ b/include/osmocom/bsc/lchan_fsm.h
@@ -56,7 +56,7 @@
LCHAN_EV_REQUEST_MODE_MODIFY,
};
-void lchan_fsm_init();
+void lchan_fsm_init(void);
void lchan_fsm_alloc(struct gsm_lchan *lchan);
void lchan_release(struct gsm_lchan *lchan, bool do_rr_release,
diff --git a/include/osmocom/bsc/neighbor_ident.h b/include/osmocom/bsc/neighbor_ident.h
index c6a2c42..bd14bd4 100644
--- a/include/osmocom/bsc/neighbor_ident.h
+++ b/include/osmocom/bsc/neighbor_ident.h
@@ -73,7 +73,7 @@
int resolve_neighbors(struct gsm_bts **local_neighbor_p, struct gsm0808_cell_id_list2
*remote_neighbors,
struct gsm_bts *from_bts, const struct cell_ab *target_ab, bool log_errors);
-void neighbor_ident_vty_init();
+void neighbor_ident_vty_init(void);
void neighbor_ident_vty_write_bts(struct vty *vty, const char *indent, struct gsm_bts
*bts);
void neighbor_ident_vty_write_network(struct vty *vty, const char *indent);
@@ -81,7 +81,7 @@
int neighbor_ident_del_neighbor(struct vty *vty, struct gsm_bts *bts, struct neighbor
*n);
int neighbor_ident_ctrl_init(void);
-int neighbors_check_cfg();
+int neighbors_check_cfg(void);
#define CELL_AB_VTY_PARAMS "arfcn <0-1023> bsic (<0-63>|any)"
#define CELL_AB_VTY_DOC \
diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 13ccdd7..ee8cc13 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -17,7 +17,7 @@
struct gsm_subscriber_connection;
struct gsm_bts;
-struct bsc_api *osmo_bsc_api();
+struct bsc_api *osmo_bsc_api(void);
int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
@@ -25,7 +25,8 @@
int bsc_handle_udt(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length);
int bsc_handle_dt(struct gsm_subscriber_connection *conn, struct msgb *msg, unsigned int
len);
-int bsc_ctrl_cmds_install();
+struct gsm_network;
+int bsc_ctrl_cmds_install(struct gsm_network *net);
void bsc_gen_location_state_trap(struct gsm_bts *bts);
diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c
index 4bba8a3..a26bb55 100644
--- a/src/ipaccess/abisip-find.c
+++ b/src/ipaccess/abisip-find.c
@@ -53,7 +53,7 @@
.format_json = false,
};
-static void print_help()
+static void print_help(void)
{
printf("\n");
printf("Usage: abisip-find [-l] [<interface-name>]\n");
@@ -265,7 +265,7 @@
void *ctx = NULL;
-void print_timestamp()
+void print_timestamp(void)
{
time_t now = time(NULL);
printf("\n\n----- %s\n", ctime(&now));
@@ -304,7 +304,7 @@
return true;
}
-bool base_stations_timeout()
+bool base_stations_timeout(void)
{
struct base_station *bs, *next_bs;
time_t now = time(NULL);
@@ -323,7 +323,7 @@
return changed;
}
-void base_stations_print()
+void base_stations_print(void)
{
struct base_station *bs;
int count = 0;
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 7ca17c6..fff7e59 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -364,7 +364,7 @@
}
}
-void assignment_fsm_init()
+void assignment_fsm_init(void)
{
OSMO_ASSERT(osmo_fsm_register(&assignment_fsm) == 0);
}
diff --git a/src/osmo-bsc/bsc_stats.c b/src/osmo-bsc/bsc_stats.c
index e8c39be..ce30720 100644
--- a/src/osmo-bsc/bsc_stats.c
+++ b/src/osmo-bsc/bsc_stats.c
@@ -229,7 +229,7 @@
all_allocated_update(&bts->all_allocated, &bts->chan_counts);
}
-void all_allocated_update_bsc()
+void all_allocated_update_bsc(void)
{
struct gsm_network *net = bsc_gsmnet;
all_allocated_update(&net->all_allocated, &net->chan_counts);
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index baa54e0..a19be0c 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -1202,7 +1202,7 @@
.event_names = gscon_fsm_event_names,
};
-void bsc_subscr_conn_fsm_init()
+void bsc_subscr_conn_fsm_init(void)
{
OSMO_ASSERT(osmo_fsm_register(&gscon_fsm) == 0);
OSMO_ASSERT(osmo_fsm_register(&lcls_fsm) == 0);
diff --git a/src/osmo-bsc/bssmap_reset.c b/src/osmo-bsc/bssmap_reset.c
index 30fc02e..fa6684d 100644
--- a/src/osmo-bsc/bssmap_reset.c
+++ b/src/osmo-bsc/bssmap_reset.c
@@ -251,7 +251,7 @@
osmo_fsm_inst_state_chg_ms(bssmap_reset->fi, BSSMAP_RESET_ST_DISC, 1, 0);
}
-static __attribute__((constructor)) void bssmap_reset_fsm_init()
+static __attribute__((constructor)) void bssmap_reset_fsm_init(void)
{
OSMO_ASSERT(osmo_fsm_register(&bssmap_reset_fsm) == 0);
}
diff --git a/src/osmo-bsc/chan_counts.c b/src/osmo-bsc/chan_counts.c
index a863178..bf86368 100644
--- a/src/osmo-bsc/chan_counts.c
+++ b/src/osmo-bsc/chan_counts.c
@@ -248,7 +248,7 @@
osmo_signal_register_handler(SS_NM, chan_counts_sig_cb, NULL);
}
-void chan_counts_bsc_verify()
+void chan_counts_bsc_verify(void)
{
struct gsm_bts *bts;
struct chan_counts bsc_counts = {0};
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 92e8c6e..0d888e0 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -293,7 +293,7 @@
};
}
-void handover_fsm_init()
+void handover_fsm_init(void)
{
OSMO_ASSERT(osmo_fsm_register(&ho_fsm) == 0);
}
diff --git a/src/osmo-bsc/handover_vty.c b/src/osmo-bsc/handover_vty.c
index e5435f5..afc12d9 100644
--- a/src/osmo-bsc/handover_vty.c
+++ b/src/osmo-bsc/handover_vty.c
@@ -170,7 +170,7 @@
#undef HO_CFG_ONE_MEMBER
}
-void ho_vty_init()
+void ho_vty_init(void)
{
ho_vty_init_cmds(GSMNET_NODE);
install_element(GSMNET_NODE, &cfg_net_ho_congestion_check_interval_cmd);
diff --git a/src/osmo-bsc/lb.c b/src/osmo-bsc/lb.c
index 276b0a1..6f3cfac 100644
--- a/src/osmo-bsc/lb.c
+++ b/src/osmo-bsc/lb.c
@@ -46,7 +46,7 @@
}
/* Send reset to SMLC */
-int bssmap_le_tx_reset()
+int bssmap_le_tx_reset(void)
{
struct osmo_ss7_instance *ss7;
struct msgb *msg;
@@ -74,7 +74,7 @@
}
/* Send reset-ack to SMLC */
-int bssmap_le_tx_reset_ack()
+int bssmap_le_tx_reset_ack(void)
{
struct osmo_ss7_instance *ss7;
struct msgb *msg;
@@ -352,7 +352,7 @@
#define DEFAULT_ASP_LOCAL_IP "localhost"
#define DEFAULT_ASP_REMOTE_IP "localhost"
-void lb_cancel_all()
+void lb_cancel_all(void)
{
struct gsm_subscriber_connection *conn;
llist_for_each_entry(conn, &bsc_gsmnet->subscr_conns, entry)
@@ -384,7 +384,7 @@
bssmap_le_tx_reset_ack();
}
-static void lb_start_reset_fsm()
+static void lb_start_reset_fsm(void)
{
struct bssmap_reset_cfg cfg = {
.conn_cfm_failure_threshold = 3,
@@ -404,13 +404,13 @@
bsc_gsmnet->smlc->bssmap_reset = bssmap_reset_alloc(bsc_gsmnet, "Lb",
&cfg);
}
-static void lb_stop_reset_fsm()
+static void lb_stop_reset_fsm(void)
{
bssmap_reset_term_and_free(bsc_gsmnet->smlc->bssmap_reset);
bsc_gsmnet->smlc->bssmap_reset = NULL;
}
-static int lb_start()
+static int lb_start(void)
{
uint32_t default_pc;
struct osmo_ss7_instance *cs7_inst = NULL;
@@ -484,7 +484,7 @@
return 0;
}
-static int lb_stop()
+static int lb_stop(void)
{
/* Not set up? */
if (!bsc_gsmnet->smlc->sccp_user)
@@ -499,7 +499,7 @@
return 0;
}
-int lb_start_or_stop()
+int lb_start_or_stop(void)
{
int rc;
if (bsc_gsmnet->smlc->enable) {
@@ -534,7 +534,7 @@
static void smlc_vty_init(void);
-int lb_init()
+int lb_init(void)
{
OSMO_ASSERT(!bsc_gsmnet->smlc);
bsc_gsmnet->smlc = talloc_zero(bsc_gsmnet, struct smlc_config);
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 21e145b..b1cef5d 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -463,7 +463,7 @@
extern void lchan_rtp_fsm_init();
-void lchan_fsm_init()
+void lchan_fsm_init(void)
{
OSMO_ASSERT(osmo_fsm_register(&lchan_fsm) == 0);
lchan_rtp_fsm_init();
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 466b168..0791619 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -70,7 +70,7 @@
} while (0)
/* Called from lchan_fsm_init(), does not need to be visible in lchan_rtp_fsm.h */
-void lchan_rtp_fsm_init()
+void lchan_rtp_fsm_init(void)
{
OSMO_ASSERT(osmo_fsm_register(&lchan_rtp_fsm) == 0);
}
diff --git a/src/osmo-bsc/neighbor_ident.c b/src/osmo-bsc/neighbor_ident.c
index 44b0b43..e41a4b2 100644
--- a/src/osmo-bsc/neighbor_ident.c
+++ b/src/osmo-bsc/neighbor_ident.c
@@ -293,7 +293,7 @@
return true;
}
-int neighbors_check_cfg()
+int neighbors_check_cfg(void)
{
/* A local neighbor can be configured by BTS number, or by a cell ID. A local neighbor
can omit the ARFCN+BSIC,
* in which case those are taken from that local BTS config. If a local neighbor has
ARFCN+BSIC configured, it
diff --git a/src/osmo-bsc/neighbor_ident_vty.c b/src/osmo-bsc/neighbor_ident_vty.c
index 86adbf2..7e58e37 100644
--- a/src/osmo-bsc/neighbor_ident_vty.c
+++ b/src/osmo-bsc/neighbor_ident_vty.c
@@ -628,7 +628,7 @@
return CMD_SUCCESS;
}
-void neighbor_ident_vty_init()
+void neighbor_ident_vty_init(void)
{
install_element(GSMNET_NODE, &cfg_neighbor_bind_cmd);
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index dd8e696..c85f1c4 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -91,12 +91,12 @@
static const char *rf_ctrl = NULL;
static int daemonize = 0;
-static void print_usage()
+static void print_usage(void)
{
printf("Usage: osmo-bsc\n");
}
-static void print_help()
+static void print_help(void)
{
printf("Some useful options:\n");
printf(" -h --help This text.\n");
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/29982
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic92aa70d569778a776f4c5d24c455f71fd50b61b
Gerrit-Change-Number: 29982
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange