forked from wolfSSL/wolfssl
Using inline functions for XMALLOC/XFREE/XREALLOC in contiki
This is necessary to avoid the "unused variable" warnings
This commit is contained in:
@@ -229,6 +229,27 @@
|
|||||||
#define SINGLE_THREADED
|
#define SINGLE_THREADED
|
||||||
#define WOLFSSL_USER_IO
|
#define WOLFSSL_USER_IO
|
||||||
#define NO_FILESYSTEM
|
#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
|
#endif
|
||||||
|
|
||||||
#if defined(WOLFSSL_IAR_ARM) || defined(WOLFSSL_ROWLEY_ARM)
|
#if defined(WOLFSSL_IAR_ARM) || defined(WOLFSSL_ROWLEY_ARM)
|
||||||
@@ -516,6 +537,9 @@
|
|||||||
#define NO_SESSION_CACHE
|
#define NO_SESSION_CACHE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_CONTIKI
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
|
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
|
||||||
!defined(FREERTOS_TCP) && !defined(EBSNET) && !defined(WOLFSSL_EROAD) && \
|
!defined(FREERTOS_TCP) && !defined(EBSNET) && !defined(WOLFSSL_EROAD) && \
|
||||||
|
Reference in New Issue
Block a user