]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
removed Visual warning
authorYann Collet <cyan@fb.com>
Sat, 19 Oct 2019 00:05:42 +0000 (17:05 -0700)
committerYann Collet <cyan@fb.com>
Sat, 19 Oct 2019 00:05:42 +0000 (17:05 -0700)
for pointer casts

programs/util.c

index c82d04e30182ff316c9b91df535a147f6ee11d37..de25bc2327f0bab4c3e055254304b506916fa889 100644 (file)
@@ -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");