[MERGED] libosmocore[master]: ctrl_test.c: fix build with GCC 7.1.1
Harald Welte has submitted this change and it was merged. Change subject: ctrl_test.c: fix build with GCC 7.1.1 .. ctrl_test.c: fix build with GCC 7.1.1 According to GCC's online docs: When an inline function is not static, then the compiler must assume that there may be calls from other source files; since a global symbol can be defined only once in any program, the function must not be defined in the other source files, so the calls therein cannot be integrated. Therefore, a non-static inline function is always compiled on its own in the usual fashion. There is no any (performance or size) benefit from 'inline' keyword in this particular file, so let's replace one by 'static'. Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f --- M tests/ctrl/ctrl_test.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 3bbab76..08be15f 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -7,7 +7,7 @@ #include #include -inline void check_type(enum ctrl_type c) +static void check_type(enum ctrl_type c) { const char *t = get_value_string(ctrl_type_vals, c); int v = get_string_value(ctrl_type_vals, t); -- To view, visit https://gerrit.osmocom.org/2895 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max
libosmocore[master]: ctrl_test.c: fix build with GCC 7.1.1
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/2895 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No
libosmocore[master]: ctrl_test.c: fix build with GCC 7.1.1
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/2895 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No
[PATCH] libosmocore[master]: ctrl_test.c: fix build with GCC 7.1.1
Review at https://gerrit.osmocom.org/2895 ctrl_test.c: fix build with GCC 7.1.1 According to GCC's online docs: When an inline function is not static, then the compiler must assume that there may be calls from other source files; since a global symbol can be defined only once in any program, the function must not be defined in the other source files, so the calls therein cannot be integrated. Therefore, a non-static inline function is always compiled on its own in the usual fashion. There is no any (performance or size) benefit from 'inline' keyword in this particular file, so let's replace one by 'static'. Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f --- M tests/ctrl/ctrl_test.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/95/2895/1 diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 3bbab76..08be15f 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -7,7 +7,7 @@ #include #include -inline void check_type(enum ctrl_type c) +static void check_type(enum ctrl_type c) { const char *t = get_value_string(ctrl_type_vals, c); int v = get_string_value(ctrl_type_vals, t); -- To view, visit https://gerrit.osmocom.org/2895 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy