[MERGED] 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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Jun 15 14:39:40 UTC 2017


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 <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: merged
Gerrit-Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list