[PATCH] libosmocore[master]: ctrl_test.c: fix build with GCC 7.1.1

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Mon Jun 12 19:17:40 UTC 2017


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 <osmocom/core/utils.h>
 #include <osmocom/ctrl/control_cmd.h>
 
-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 <axilirator at gmail.com>



More information about the gerrit-log mailing list