Using inline functions for XMALLOC/XFREE/XREALLOC in contiki

This is necessary to avoid the "unused variable" warnings
pull/1656/head
Daniele Lacamera 2018-07-02 11:32:57 +02:00
parent 3d27a8dc53
commit 79a7518fdd
1 changed files with 24 additions and 0 deletions

View File

@ -229,6 +229,27 @@
#define SINGLE_THREADED
#define WOLFSSL_USER_IO
#define NO_FILESYSTEM
static inline void* XREALLOC(void *p, size_t n, void* heap, int type)
{
(void)heap;
(void)type;
return realloc(p,n);
}
static inline void *XMALLOC(size_t n, void* heap, int type)
{
(void)heap;
(void)type;
return malloc(n);
}
static inline void XFREE(void *p, void* heap, int type)
{
(void)heap;
(void)type;
free(p);
}
#endif
#if defined(WOLFSSL_IAR_ARM) || defined(WOLFSSL_ROWLEY_ARM)
@ -516,6 +537,9 @@
#define NO_SESSION_CACHE
#endif
#ifdef WOLFSSL_CONTIKI
#endif
/* Micrium will use Visual Studio for compilation but not the Win32 API */
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
!defined(FREERTOS_TCP) && !defined(EBSNET) && !defined(WOLFSSL_EROAD) && \