This commit is to fix below compilation error on client example.
CC: libcoap-client.c
libcoap-client.c:787:47: error: '_token_data' is static but used
in inline function 'cmdline_token' which is not static [-Werror]
strncpy((char *)the_token.s, arg, min(sizeof(_token_data), strlen(arg)));
^
libcoap-client.c:82:32: note: in definition of macro 'min'
#define min(a,b) ((a) < (b) ? (a) : (b))
^
ibcoap-client.c:787:47: error: '_token_data' is static but used
in inline function 'cmdline_token' which is not static [-Werror]
strncpy((char *)the_token.s, arg, min(sizeof(_token_data), strlen(arg)));
^
libcoap-client.c:82:20: note: in definition of macro 'min'
#define min(a,b) ((a) < (b) ? (a) : (b))
^
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
Change-Id: I820e3c872ca100b9e34027e1d28e4b4f42c78d11
return 1;
}
-inline void cmdline_token(char *arg)
+inline static void cmdline_token(char *arg)
{
strncpy((char *)the_token.s, arg, min(sizeof(_token_data), strlen(arg)));
the_token.length = strlen(arg);