mirror of https://github.com/wolfSSL/wolfssl.git
Using inline functions for XMALLOC/XFREE/XREALLOC in contiki
This is necessary to avoid the "unused variable" warningspull/1656/head
parent
3d27a8dc53
commit
79a7518fdd
|
@ -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) && \
|
||||
|
|
Loading…
Reference in New Issue