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: I861be39275b40c522c02f553074c5a4489e87127changes/80/29980/3
parent
53f6067e97
commit
7a4765325d
|
@ -749,7 +749,7 @@ static int hlr_ctrl_node_lookup(void *data, vector vline, int *node_type,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int hlr_ctrl_cmds_install()
|
||||
static int hlr_ctrl_cmds_install(void)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ void dgsm_start(void *ctx)
|
|||
dgsm_mdns_client_config_apply();
|
||||
}
|
||||
|
||||
void dgsm_stop()
|
||||
void dgsm_stop(void)
|
||||
{
|
||||
g_hlr->mslookup.allow_startup = false;
|
||||
mslookup_server_mdns_config_apply();
|
||||
|
|
|
@ -568,12 +568,12 @@ static int read_cb(struct osmo_gsup_conn *conn, struct msgb *msg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void print_usage()
|
||||
static void print_usage(void)
|
||||
{
|
||||
printf("Usage: osmo-hlr\n");
|
||||
}
|
||||
|
||||
static void print_help()
|
||||
static void print_help(void)
|
||||
{
|
||||
printf(" -h --help This text.\n");
|
||||
printf(" -c --config-file filename The config file to use.\n");
|
||||
|
|
|
@ -51,7 +51,7 @@ static struct {
|
|||
.db_upgrade = false,
|
||||
};
|
||||
|
||||
static void print_help()
|
||||
static void print_help(void)
|
||||
{
|
||||
printf("\n");
|
||||
printf("Usage: osmo-hlr-db-tool [-l <hlr.db>] [create|import-nitb-db <nitb.db>]\n");
|
||||
|
|
|
@ -314,7 +314,7 @@ static struct osmo_fsm lu_fsm = {
|
|||
.cleanup = lu_fsm_cleanup,
|
||||
};
|
||||
|
||||
static __attribute__((constructor)) void lu_fsm_init()
|
||||
static __attribute__((constructor)) void lu_fsm_init(void)
|
||||
{
|
||||
OSMO_ASSERT(osmo_fsm_register(&lu_fsm) == 0);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ static void print_version(void)
|
|||
"\n");
|
||||
}
|
||||
|
||||
static void print_help()
|
||||
static void print_help(void)
|
||||
{
|
||||
print_version();
|
||||
printf(
|
||||
|
@ -555,7 +555,7 @@ int socket_init(const char *sock_path)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void socket_close()
|
||||
void socket_close(void)
|
||||
{
|
||||
struct socket_client *c, *n;
|
||||
llist_for_each_entry_safe(c, n, &globals.socket_clients, entry)
|
||||
|
|
|
@ -49,7 +49,7 @@ static void set_result(struct osmo_mslookup_result *result,
|
|||
result->age = age;
|
||||
}
|
||||
|
||||
const struct mslookup_service_host *mslookup_server_get_local_gsup_addr()
|
||||
const struct mslookup_service_host *mslookup_server_get_local_gsup_addr(void)
|
||||
{
|
||||
static struct mslookup_service_host gsup_bind = {};
|
||||
struct mslookup_service_host *host;
|
||||
|
|
|
@ -121,7 +121,7 @@ void osmo_mslookup_server_mdns_stop(struct osmo_mslookup_server_mdns *server)
|
|||
talloc_free(server);
|
||||
}
|
||||
|
||||
void mslookup_server_mdns_config_apply()
|
||||
void mslookup_server_mdns_config_apply(void)
|
||||
{
|
||||
/* Check whether to start/stop/restart mDNS server */
|
||||
bool should_run;
|
||||
|
|
|
@ -509,7 +509,7 @@ static void test_gen_vectors_3g_xor(void)
|
|||
}
|
||||
|
||||
/* Test a variety of invalid authentication data combinations */
|
||||
void test_gen_vectors_bad_args()
|
||||
void test_gen_vectors_bad_args(void)
|
||||
{
|
||||
struct osmo_auth_vector vec;
|
||||
uint8_t auts[14];
|
||||
|
|
|
@ -100,7 +100,7 @@ int rand_get(uint8_t *rand, unsigned int len)
|
|||
|
||||
FUNCTIONS
|
||||
|
||||
int main()
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
printf("3GPP TS 55.205 Test Sets\n");
|
||||
void *tall_ctx = talloc_named_const(NULL, 1, "test");
|
||||
|
|
|
@ -246,7 +246,7 @@ static int db_subscr_lu_str(struct db_context *dbc, int64_t subscr_id,
|
|||
return db_subscr_lu(dbc, subscr_id, &vlr_nr, is_ps, NULL);
|
||||
}
|
||||
|
||||
static void test_subscr_create_update_sel_delete()
|
||||
static void test_subscr_create_update_sel_delete(void)
|
||||
{
|
||||
int64_t id0, id1, id2, id_short;
|
||||
comment_start();
|
||||
|
@ -541,7 +541,7 @@ static const struct sub_auth_data_str *mk_aud_3g(enum osmo_auth_algo algo,
|
|||
return &aud;
|
||||
}
|
||||
|
||||
static void test_subscr_aud()
|
||||
static void test_subscr_aud(void)
|
||||
{
|
||||
int64_t id;
|
||||
|
||||
|
@ -783,7 +783,7 @@ static void test_subscr_aud()
|
|||
|
||||
/* Make each key too short in this test. Note that we can't set them longer than the allowed size without changing the
|
||||
* table structure. */
|
||||
static void test_subscr_aud_invalid_len()
|
||||
static void test_subscr_aud_invalid_len(void)
|
||||
{
|
||||
int64_t id;
|
||||
|
||||
|
@ -845,7 +845,7 @@ static void test_subscr_aud_invalid_len()
|
|||
comment_end();
|
||||
}
|
||||
|
||||
static void test_subscr_sqn()
|
||||
static void test_subscr_sqn(void)
|
||||
{
|
||||
int64_t id;
|
||||
|
||||
|
@ -918,7 +918,7 @@ static void test_subscr_sqn()
|
|||
comment_end();
|
||||
}
|
||||
|
||||
static void test_ind()
|
||||
static void test_ind(void)
|
||||
{
|
||||
comment_start();
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ static const struct osmo_mdns_rfc_header header_enc_dec_test_data[] = {
|
|||
},
|
||||
};
|
||||
|
||||
void test_enc_dec_rfc_header()
|
||||
void test_enc_dec_rfc_header(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -241,7 +241,7 @@ void test_enc_dec_rfc_header()
|
|||
}
|
||||
}
|
||||
|
||||
void test_enc_dec_rfc_header_einval()
|
||||
void test_enc_dec_rfc_header_einval(void)
|
||||
{
|
||||
struct osmo_mdns_rfc_header out = {0};
|
||||
struct msgb *msg = msgb_alloc(4096, "dns_test");
|
||||
|
@ -578,7 +578,7 @@ static void test_result_from_answer(void *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
void *ctx = talloc_named_const(NULL, 0, "main");
|
||||
osmo_init_logging2(ctx, NULL);
|
||||
|
|
|
@ -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)");
|
||||
|
|
|
@ -147,7 +147,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;
|
||||
|
||||
|
@ -169,7 +169,7 @@ static void result_cb_once(struct osmo_mslookup_client *client,
|
|||
LOGP(DMSLOOKUP, LOGL_DEBUG, "result_cb(): %s\n", osmo_mslookup_result_name_c(ctx, query, result));
|
||||
}
|
||||
|
||||
int main()
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
ctx = talloc_named_const(NULL, 0, "main");
|
||||
osmo_init_logging2(ctx, NULL);
|
||||
|
|
|
@ -50,7 +50,7 @@ const char *domains[] = {
|
|||
"qwerty.1.qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmm",
|
||||
};
|
||||
|
||||
void test_osmo_mslookup_query_init_from_domain_str()
|
||||
void test_osmo_mslookup_query_init_from_domain_str(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ARRAY_SIZE(domains); i++) {
|
||||
|
@ -68,7 +68,7 @@ void test_osmo_mslookup_query_init_from_domain_str()
|
|||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
ctx = talloc_named_const(NULL, 0, "main");
|
||||
osmo_init_logging2(ctx, NULL);
|
||||
|
|
Loading…
Reference in New Issue