From 21545ab6434e78390bf29fdbfb4462bc12b9c645 Mon Sep 17 00:00:00 2001 From: Juha Niskanen Date: Thu, 30 Mar 2017 06:54:59 -0600 Subject: [PATCH] net/local: connect: Fix warning with gcc-arm-none-eabi-5-2016q1. Using compiler from gcc-arm-none-eabi-5-2016q1 toolchain: gcc version 5.3.1 20160307 (release) [ARM/embedded-5-branch revision 234589] (GNU Tools for ARM Embedded Processors) gives error: local/local_connect.c:188:7: error: '_local_semtake' is static but used in inline function 'local_stream_connect' which is not static [-Werror] this is due to compiler enforcing ISO/IEC 9899:1999 6.7.4.3: "An inline definition of a function with external linkage shall not contain a definition of a modifiable object with static storage duration, and shall not contain a reference to an identifier with internal linkage." Fix by making inlined caller to have internal linkage as well. --- net/local/local_connect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/local/local_connect.c b/net/local/local_connect.c index 53dd321905..ee9a1dc2c9 100644 --- a/net/local/local_connect.c +++ b/net/local/local_connect.c @@ -121,9 +121,9 @@ static inline void _local_semtake(sem_t *sem) * ****************************************************************************/ -int inline local_stream_connect(FAR struct local_conn_s *client, - FAR struct local_conn_s *server, - bool nonblock) +static int inline local_stream_connect(FAR struct local_conn_s *client, + FAR struct local_conn_s *server, + bool nonblock) { int ret;