From 978659d34f4e0ec1bb2a1e2eebb137b925f4ca43 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Wed, 23 Sep 2020 12:54:10 -0700 Subject: [PATCH] [linux-kernel] Fix unused variable warnings with malloc, calloc, and free --- contrib/linux-kernel/zstd_deps.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/linux-kernel/zstd_deps.h b/contrib/linux-kernel/zstd_deps.h index d4ea0b2a4..44ec0328f 100644 --- a/contrib/linux-kernel/zstd_deps.h +++ b/contrib/linux-kernel/zstd_deps.h @@ -56,9 +56,9 @@ typedef int64_t S64; #ifndef ZSTD_DEPS_MALLOC #define ZSTD_DEPS_MALLOC -#define ZSTD_malloc(s) (NULL) -#define ZSTD_free(p) ((void)0) -#define ZSTD_calloc(n,s) (NULL) +#define ZSTD_malloc(s) ({ (void)(s); NULL; }) +#define ZSTD_free(p) ((void)(p)) +#define ZSTD_calloc(n,s) ({ (void)(n); (void)(s); NULL; }) #endif /* ZSTD_DEPS_MALLOC */ #endif /* ZSTD_DEPS_NEED_MALLOC */