From: Nick Terrell Date: Wed, 23 Sep 2020 19:54:10 +0000 (-0700) Subject: [linux-kernel] Fix unused variable warnings with malloc, calloc, and free X-Git-Tag: v1.4.7~72^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=978659d34f4e0ec1bb2a1e2eebb137b925f4ca43;p=thirdparty%2Fzstd.git [linux-kernel] Fix unused variable warnings with malloc, calloc, and free --- 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 */