From: Richard Barnes Date: Fri, 26 Apr 2024 21:44:41 +0000 (-0700) Subject: Increase x-compatibility X-Git-Tag: v1.5.7^2~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97291fc5020a8994019ab76cf0cda83a9824374c;p=thirdparty%2Fzstd.git Increase x-compatibility --- diff --git a/lib/zstd.h b/lib/zstd.h index e4c9ffc87..aa4ea23af 100644 --- a/lib/zstd.h +++ b/lib/zstd.h @@ -1802,11 +1802,15 @@ static #ifdef __GNUC__ __attribute__((__unused__)) #endif -// Disable diagnostic for C++ compatibility + +#if defined(__clang__) && __clang_major__ >= 5 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" +#endif ZSTD_customMem const ZSTD_defaultCMem = { NULL, NULL, NULL }; /**< this constant defers to stdlib's functions */ +#if defined(__clang__) && __clang_major__ >= 5 #pragma clang diagnostic pop +#endif ZSTDLIB_STATIC_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem); ZSTDLIB_STATIC_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);