pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-sgsn/+/30869 )
Change subject: Fix -Werror=old-style-definition
......................................................................
Fix -Werror=old-style-definition
Change-Id: I119d4ba58d9c68df12b433b0cee924468a1473d8
---
M include/osmocom/sgsn/gprs_sgsn.h
M src/gtphub/gtphub.c
M src/sgsn/gprs_sgsn.c
M tests/gprs/gprs_test.c
M tests/gtphub/gtphub_test.c
M tests/sgsn/sgsn_test.c
6 files changed, 15 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/69/30869/1
diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h
index 034aebc..e34a019 100644
--- a/include/osmocom/sgsn/gprs_sgsn.h
+++ b/include/osmocom/sgsn/gprs_sgsn.h
@@ -460,6 +460,6 @@
/* 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 */
diff --git a/src/gtphub/gtphub.c b/src/gtphub/gtphub.c
index 09d01fc..89ca676 100644
--- a/src/gtphub/gtphub.c
+++ b/src/gtphub/gtphub.c
@@ -971,7 +971,7 @@
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 @@
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 @@
/* 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 @@
!= 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 @@
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));
diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c
index 8cfee69..76a5743 100644
--- a/src/sgsn/gprs_sgsn.c
+++ b/src/sgsn/gprs_sgsn.c
@@ -145,7 +145,7 @@
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);
}
diff --git a/tests/gprs/gprs_test.c b/tests/gprs/gprs_test.c
index 89dac07..f239b70 100644
--- a/tests/gprs/gprs_test.c
+++ b/tests/gprs/gprs_test.c
@@ -24,7 +24,7 @@
return ret;
}
-static void test_8_4_2()
+static void test_8_4_2(void)
{
printf("Testing gprs_llc_is_retransmit.\n");
diff --git a/tests/gtphub/gtphub_test.c b/tests/gtphub/gtphub_test.c
index dab3977..13d2636 100644
--- a/tests/gtphub/gtphub_test.c
+++ b/tests/gtphub/gtphub_test.c
@@ -577,7 +577,7 @@
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 @@
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 @@
"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 @@
return 1;
}
-static int create_pdp_ctx()
+static int create_pdp_ctx(void)
{
const char *gtp_req_from_sgsn =
MSG_PDP_CTX_REQ("0068",
diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c
index 44218de..18d3c19 100644
--- a/tests/sgsn/sgsn_test.c
+++ b/tests/sgsn/sgsn_test.c
@@ -58,7 +58,7 @@
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 @@
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 assert_no_subscrs()
+static void assert_no_subscrs(void)
{
show_subscrs(stdout);
fflush(stdout);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-sgsn/+/30869
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I119d4ba58d9c68df12b433b0cee924468a1473d8
Gerrit-Change-Number: 30869
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange