From 5efdee42778c3b711e0c92c6edbfd617b8707ed8 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 20 Aug 2020 14:02:53 -0500 Subject: [PATCH] wolfssl/wolfcrypt/types.h: tweak _LINUXKM macros XMALLOC(), XFREE(), and XREALLOC() to dummy-use "heap" and "dynamic type" arguments. --- wolfssl/wolfcrypt/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 226568f91..b1f3177d3 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -362,9 +362,9 @@ decouple library dependencies with standard string, memory and so on. #elif defined(WOLFSSL_LINUXKM) /* the requisite linux/slab.h is included in wc_port.h, with incompatible warnings masked out. */ - #define XMALLOC(s, h, t) ((void)h, (void)t, kmalloc((s), GFP_KERNEL)) - #define XFREE(p, h, t) {void* xp = (p); if((xp)) kfree((xp));} - #define XREALLOC(p, n, h, t) krealloc((p), (n), GFP_KERNEL) + #define XMALLOC(s, h, t) ({(void)(h); (void)(t); kmalloc(s, GFP_KERNEL);}) + #define XFREE(p, h, t) ({void* _xp; (void)(h); _xp = (p); if(_xp) kfree(_xp);}) + #define XREALLOC(p, n, h, t) ({(void)(h); (void)(t); krealloc((p), (n), GFP_KERNEL);}) #elif !defined(MICRIUM_MALLOC) && !defined(EBSNET) \ && !defined(WOLFSSL_SAFERTOS) && !defined(FREESCALE_MQX) \