diff options
author | Harald Welte <laforge@osmocom.org> | 2022-11-03 11:38:41 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-11-03 12:56:24 +0100 |
commit | 7a4765325d1f6accdbad3b74abddc2760f014c11 (patch) | |
tree | f638191d039d92fe773e503e26a12a1629888fb1 /tests/mslookup/mslookup_client_mdns_test.c | |
parent | 53f6067e97ca77769dd94a6946d3bffdc2b118e7 (diff) |
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: I861be39275b40c522c02f553074c5a4489e87127
Diffstat (limited to 'tests/mslookup/mslookup_client_mdns_test.c')
-rw-r--r-- | tests/mslookup/mslookup_client_mdns_test.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/mslookup/mslookup_client_mdns_test.c b/tests/mslookup/mslookup_client_mdns_test.c index dc9d1d5..274e1e7 100644 --- a/tests/mslookup/mslookup_client_mdns_test.c +++ b/tests/mslookup/mslookup_client_mdns_test.c @@ -80,14 +80,14 @@ static int server_recv(struct osmo_fd *osmo_fd, unsigned int what) return n; } -static void server_init() +static void server_init(void) { fprintf(stderr, "%s\n", __func__); server_mc = osmo_mdns_sock_init(ctx, TEST_IP, TEST_PORT, server_recv, NULL, 0); OSMO_ASSERT(server_mc); } -static void server_stop() +static void server_stop(void) { fprintf(stderr, "%s\n", __func__); OSMO_ASSERT(server_mc); @@ -98,7 +98,7 @@ static void server_stop() struct osmo_mslookup_client* client; struct osmo_mslookup_client_method* client_method; -static void client_init() +static void client_init(void) { fprintf(stderr, "%s\n", __func__); client = osmo_mslookup_client_new(ctx); @@ -117,7 +117,7 @@ static void client_recv(struct osmo_mslookup_client *client, uint32_t request_ha osmo_mslookup_client_request_cancel(client, request_handle); } -static void client_query() +static void client_query(void) { struct osmo_mslookup_id id = {.type = OSMO_MSLOOKUP_ID_IMSI, .imsi = "123456789012345"}; @@ -134,7 +134,7 @@ static void client_query() osmo_mslookup_client_request(client, &query, &handling); } -static void client_stop() +static void client_stop(void) { fprintf(stderr, "%s\n", __func__); osmo_mslookup_client_free(client); @@ -154,7 +154,7 @@ const struct timeval fake_time_start_time = { 0, 0 }; osmo_timers_update(); \ } while (0) -static void fake_time_start() +static void fake_time_start(void) { struct timespec *clock_override; @@ -167,7 +167,7 @@ static void fake_time_start() osmo_clock_override_enable(CLOCK_MONOTONIC, true); fake_time_passes(0, 0); } -static void test_server_client() +static void test_server_client(void) { fprintf(stderr, "-- %s --\n", __func__); server_init(); @@ -190,7 +190,7 @@ static void test_server_client() client_stop(); } -bool is_multicast_enabled() +bool is_multicast_enabled(void) { bool ret = true; struct addrinfo *ai; @@ -222,7 +222,7 @@ bool is_multicast_enabled() /* * Run all tests */ -int main() +int main(int argc, char **argv) { if (!is_multicast_enabled()) { fprintf(stderr, "ERROR: multicast is disabled! (OS#4361)"); |