laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29981 )
Change subject: Support building with -Werror=strict-prototypes / -Werror=old-style-definition ......................................................................
Support 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: I98a3c0d5cfda2c4b020652efb4f445f8288342b6 --- M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c M src/libosmo-mgcp-client/mgcp_client_fsm.c M src/osmo-mgw/mgw_main.c 3 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/81/29981/1
diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c index b8f09d5..a01bbdc 100644 --- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c @@ -227,7 +227,7 @@
static char osmo_mgcpc_ep_fsm_event_name_bufs[32][32] = {};
-static void fill_event_names() +static void fill_event_names(void) { int i; for (i = 0; i < (ARRAY_SIZE(osmo_mgcpc_ep_fsm_event_names) - 1); i++) { @@ -243,7 +243,7 @@ } }
-static __attribute__((constructor)) void osmo_mgcpc_ep_fsm_init() +static __attribute__((constructor)) void osmo_mgcpc_ep_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&osmo_mgcpc_ep_fsm) == 0); fill_event_names(); diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 1a2b6d8..660f0ad 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -760,7 +760,7 @@ return buf; }
-static __attribute__((constructor)) void osmo_mgcp_client_fsm_init() +static __attribute__((constructor)) void osmo_mgcp_client_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&fsm_mgcp_client) == 0); } diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 71b1f1e..7a76210 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -95,7 +95,7 @@ /* used by msgb and mgcp */ void *tall_mgw_ctx = NULL;
-static void print_help() +static void print_help(void) { printf("Some useful options:\n"); printf(" -h --help is printing this text.\n");