Fixed some C compiler warnings

This commit is contained in:
Simon Goldschmidt 2011-07-24 17:19:17 +02:00
parent d79c5baa1b
commit 7465be91d0

View File

@ -112,7 +112,7 @@ volatile u8_t pbuf_free_ooseq_pending;
* can only be used with NO_SYS=0 and through tcpip_callback. * can only be used with NO_SYS=0 and through tcpip_callback.
*/ */
void void
pbuf_free_ooseq() pbuf_free_ooseq(void)
{ {
struct tcp_pcb* pcb; struct tcp_pcb* pcb;
SYS_ARCH_DECL_PROTECT(old_level); SYS_ARCH_DECL_PROTECT(old_level);
@ -132,6 +132,7 @@ pbuf_free_ooseq()
} }
} }
#if !NO_SYS
/** /**
* Just a callback function for tcpip_timeout() that calls pbuf_free_ooseq(). * Just a callback function for tcpip_timeout() that calls pbuf_free_ooseq().
*/ */
@ -141,18 +142,20 @@ pbuf_free_ooseq_callback(void *arg)
LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(arg);
pbuf_free_ooseq(); pbuf_free_ooseq();
} }
#endif /* !NO_SYS */
/** Queue a call to pbuf_free_ooseq if not already queued. */ /** Queue a call to pbuf_free_ooseq if not already queued. */
static void static void
pbuf_pool_is_empty(void) pbuf_pool_is_empty(void)
{ {
SYS_ARCH_DECL_PROTECT(old_level);
#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL #ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL
SYS_ARCH_DECL_PROTECT(old_level);
SYS_ARCH_PROTECT(old_level); SYS_ARCH_PROTECT(old_level);
pbuf_free_ooseq_pending = 1; pbuf_free_ooseq_pending = 1;
SYS_ARCH_UNPROTECT(old_level); SYS_ARCH_UNPROTECT(old_level);
#else /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ #else /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */
u8_t queued; u8_t queued;
SYS_ARCH_DECL_PROTECT(old_level);
SYS_ARCH_PROTECT(old_level); SYS_ARCH_PROTECT(old_level);
queued = pbuf_free_ooseq_pending; queued = pbuf_free_ooseq_pending;
pbuf_free_ooseq_pending = 1; pbuf_free_ooseq_pending = 1;