mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
Fixed minor compilation warnings
Warnings outputed by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
* pcl/pcl.c:385:17: warning: unused variable ‘r’ [-Wunused-variable]
* Use pre-compilation directive to avoid defining unused function when not needed:
* pcl/pcl.c:62:12: warning: ‘co_ctx_stackdir’ defined but not used [-Wunused-function]
static int co_ctx_stackdir(void)
* pcl/pcl.c:54:12: warning: ‘co_ctx_sdir’ defined but not used [-Wunused-function]
static int co_ctx_sdir(unsigned long psp)
Signed-off-by: Pierre Souchay <pierre@souchay.net>
This commit is contained in:
@@ -51,6 +51,7 @@ static co_ctx_t ctx_caller;
|
||||
#endif /* #if defined(CO_USE_SIGCONTEXT) */
|
||||
|
||||
|
||||
#if defined(CO_HAS_SIGSTACK)
|
||||
static int co_ctx_sdir(unsigned long psp)
|
||||
{
|
||||
int nav = 0;
|
||||
@@ -65,6 +66,7 @@ static int co_ctx_stackdir(void)
|
||||
|
||||
return co_ctx_sdir((unsigned long) &cav);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CO_USE_UCONEXT)
|
||||
|
||||
@@ -382,7 +384,7 @@ static void co_runner(void)
|
||||
|
||||
coroutine_t co_create(void (*func)(void *), void *data, void *stack, int size)
|
||||
{
|
||||
int alloc = 0, r = CO_STK_COROSIZE;
|
||||
int alloc = 0;
|
||||
coroutine *co;
|
||||
|
||||
if ((size &= ~(sizeof(long) - 1)) < CO_MIN_SIZE)
|
||||
|
||||
Reference in New Issue
Block a user