From: Yann Collet Date: Sat, 19 Oct 2019 00:05:42 +0000 (-0700) Subject: removed Visual warning X-Git-Tag: v1.4.4~1^2~23^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3796370259059657048350d22f446f5e5e2525e;p=thirdparty%2Fzstd.git removed Visual warning for pointer casts --- diff --git a/programs/util.c b/programs/util.c index c82d04e30..de25bc232 100644 --- a/programs/util.c +++ b/programs/util.c @@ -399,6 +399,11 @@ int UTIL_countPhysicalCores(void) DWORD returnLength = 0; size_t byteOffset = 0; +#ifdef (_MSC_VER) +/* Visual Studio does not like the following cast */ +# pragma warning( disable : 4054 ) /* conversion from function ptr to data ptr */ +# pragma warning( disable : 4055 ) /* conversion from data ptr to function ptr */ +#endif glpi = (LPFN_GLPI)(void*)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "GetLogicalProcessorInformation");