From: W. Felix Handte Date: Fri, 1 May 2020 20:48:21 +0000 (-0400) Subject: Try to Fix MSVC Error X-Git-Tag: v1.4.5^2~50^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2099%2Fhead;p=thirdparty%2Fzstd.git Try to Fix MSVC Error It's complaining about the `memcpy`s, saying: "warning C4090: 'function': different 'const' qualifiers" Let's try explicitly casting to the argument types... --- diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 52bc02c48..233468106 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -473,10 +473,22 @@ static int basicUnitTests(U32 const seed, double compressibility) const void *voidptr_copyDCtx; const void *voidptr_nextInputType; DEBUG_STATIC_ASSERT(sizeof(funcptr_getDictID) == sizeof(voidptr_getDictID)); - memcpy(&voidptr_getDictID , &funcptr_getDictID , sizeof(void*)); - memcpy(&voidptr_createDStream, &funcptr_createDStream, sizeof(void*)); - memcpy(&voidptr_copyDCtx , &funcptr_copyDCtx , sizeof(void*)); - memcpy(&voidptr_nextInputType, &funcptr_nextInputType, sizeof(void*)); + memcpy( + (void*)&voidptr_getDictID, + (const void*)&funcptr_getDictID, + sizeof(void*)); + memcpy( + (void*)&voidptr_createDStream, + (const void*)&funcptr_createDStream, + sizeof(void*)); + memcpy( + (void*)&voidptr_copyDCtx, + (const void*)&funcptr_copyDCtx, + sizeof(void*)); + memcpy( + (void*)&voidptr_nextInputType, + (const void*)&funcptr_nextInputType, + sizeof(void*)); DISPLAYLEVEL(3, "%p ", voidptr_getDictID); DISPLAYLEVEL(3, "%p ", voidptr_createDStream); DISPLAYLEVEL(3, "%p ", voidptr_copyDCtx);