Fix -Werror=old-style-definition

Change-Id: I119d4ba58d9c68df12b433b0cee924468a1473d8
changes/69/30869/2
Pau Espin 2023-01-05 14:20:27 +01:00
parent 920c6c8c81
commit f37aedbf76
6 changed files with 16 additions and 15 deletions

View File

@ -460,6 +460,6 @@ struct gsm_auth_tuple *sgsn_auth_get_tuple(struct sgsn_mm_ctx *mmctx,
/* Called on subscriber data updates */
void sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx);
void sgsn_rate_ctr_init();
void sgsn_rate_ctr_init(void);
#endif /* _GPRS_SGSN_H */

View File

@ -971,7 +971,7 @@ static inline void set_tei(struct gtp_packet_desc *p, uint32_t tei)
static void gtphub_mapping_del_cb(struct expiring_item *expi);
static struct nr_mapping *gtphub_mapping_new()
static struct nr_mapping *gtphub_mapping_new(void)
{
struct nr_mapping *nrm;
nrm = talloc_zero(osmo_gtphub_ctx, struct nr_mapping);
@ -995,7 +995,7 @@ static const char *gtphub_tunnel_side_str(struct gtphub_tunnel *tun,
char *pos = buf;
int left = sizeof(buf);
int l;
struct gtphub_tunnel_endpoint *c, *u;
c = &tun->endpoint[side_idx][GTPH_PLANE_CTRL];
u = &tun->endpoint[side_idx][GTPH_PLANE_USER];
@ -1104,7 +1104,7 @@ static void gtphub_tunnel_del_cb(struct expiring_item *expi)
/* rate counter index for hubs: [7; 10] */
#define CTR_IDX_HUB(s, p) CTR_IDX(s, p, 3, 2)
static struct gtphub_tunnel *gtphub_tunnel_new()
static struct gtphub_tunnel *gtphub_tunnel_new(void)
{
struct gtphub_tunnel *tun;
tun = talloc_zero(osmo_gtphub_ctx, struct gtphub_tunnel);
@ -2283,7 +2283,7 @@ int gtphub_handle_buf(struct gtphub *hub,
!= 0)
return -1;
}
/* Either to_peer was resolved from an existing tunnel,
* or a PDP Ctx and thus a tunnel has just been created,
* or the tunnel has been deleted due to this message. */
@ -2690,7 +2690,7 @@ static struct gtphub_peer_addr *gtphub_addr_have(struct gtphub *hub,
struct gtphub_peer *peer = gtphub_peer_new(hub, bind);
a = gtphub_peer_add_addr(peer, addr);
LOG(LOGL_DEBUG, "New peer address: %s %s\n",
bind->label,
gsn_addr_to_str(&a->addr));

View File

@ -145,7 +145,8 @@ static const struct rate_ctr_group_desc sgsn_ctrg_desc = {
sgsn_ctr_description,
};
void sgsn_rate_ctr_init() {
void sgsn_rate_ctr_init(void)
{
sgsn->rate_ctrs = rate_ctr_group_alloc(tall_sgsn_ctx, &sgsn_ctrg_desc, 0);
OSMO_ASSERT(sgsn->rate_ctrs);
}

View File

@ -24,7 +24,7 @@ static int nu_is_retransmission(uint16_t nu, uint16_t vur)
return ret;
}
static void test_8_4_2()
static void test_8_4_2(void)
{
printf("Testing gprs_llc_is_retransmit.\n");

View File

@ -577,7 +577,7 @@ time_t now;
static struct gtphub _hub;
static struct gtphub *hub = &_hub;
static int setup_test_hub()
static int setup_test_hub(void)
{
/* Not really needed, but to make 100% sure... */
ZERO_STRUCT(hub);
@ -613,7 +613,7 @@ static int setup_test_hub()
return 1;
}
static int clear_test_hub()
static int clear_test_hub(void)
{
/* expire all */
gtphub_gc(hub, now + (60 * GTPH_EXPIRE_SLOWLY_MINUTES) + 1);
@ -817,7 +817,7 @@ static void test_echo(void)
"87" /* 135: Quality of Service (QoS) Profile */ \
"0004" /* length */ \
"00" /* priority */ \
"0b921f" /* QoS profile data */
"0b921f" /* QoS profile data */
#define MSG_PDP_CTX_RSP(len, tei_h, seq, restart, tei_u, tei_c, gsn_c, gsn_u) \
"32" \
@ -898,7 +898,7 @@ static int msg_from_ggsn(int plane_idx,
return 1;
}
static int create_pdp_ctx()
static int create_pdp_ctx(void)
{
const char *gtp_req_from_sgsn =
MSG_PDP_CTX_REQ("0068",

View File

@ -58,7 +58,7 @@ unsigned sgsn_tx_counter = 0;
struct msgb *last_msg = NULL;
struct gprs_gb_parse_context last_dl_parse_ctx;
static void reset_last_msg()
static void reset_last_msg(void)
{
if (last_msg)
msgb_free(last_msg);
@ -67,7 +67,7 @@ static void reset_last_msg()
memset(&last_dl_parse_ctx, 0, sizeof(last_dl_parse_ctx));
}
static void cleanup_test()
static void cleanup_test(void)
{
reset_last_msg();
}
@ -284,7 +284,7 @@ static void show_subscrs(FILE *out)
}
}
static void assert_no_subscrs()
static void assert_no_subscrs(void)
{
show_subscrs(stdout);
fflush(stdout);