diff --git a/contrib/cmake/vcpkg_overlay_ports/jxrlib/portfile.cmake b/contrib/cmake/vcpkg_overlay_ports/jxrlib/portfile.cmake index d0b1df6318..066b75d05a 100644 --- a/contrib/cmake/vcpkg_overlay_ports/jxrlib/portfile.cmake +++ b/contrib/cmake/vcpkg_overlay_ports/jxrlib/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( guiddef.patch fix-mingw.patch tmpnam.patch + warnings.patch ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") diff --git a/contrib/cmake/vcpkg_overlay_ports/jxrlib/warnings.patch b/contrib/cmake/vcpkg_overlay_ports/jxrlib/warnings.patch new file mode 100644 index 0000000000..084a852600 --- /dev/null +++ b/contrib/cmake/vcpkg_overlay_ports/jxrlib/warnings.patch @@ -0,0 +1,90 @@ +diff --git a/jxrencoderdecoder/JxrDecApp.c b/jxrencoderdecoder/JxrDecApp.c +index 35fa10c..c6c6d04 100644 +--- a/jxrencoderdecoder/JxrDecApp.c ++++ b/jxrencoderdecoder/JxrDecApp.c +@@ -427,7 +427,7 @@ ERR WmpDecAppCreateEncoderFromExt( + Call(GetTestEncodeIID(szExt, &pIID)); + + // Create encoder +- Call(PKTestFactory_CreateCodec(pIID, ppIE)); ++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppIE)); + + Cleanup: + return err; +diff --git a/jxrencoderdecoder/JxrEncApp.c b/jxrencoderdecoder/JxrEncApp.c +index aa9de53..63cbaf8 100644 +--- a/jxrencoderdecoder/JxrEncApp.c ++++ b/jxrencoderdecoder/JxrEncApp.c +@@ -615,7 +615,7 @@ main(int argc, char* argv[]) + + //================================ + Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); +- Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, &pEncoder)); ++ Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, (void**)&pEncoder)); + + //---------------------------------------------------------------- + Call(PKCreateTestFactory(&pTestFactory, WMP_SDK_VERSION)); +diff --git a/jxrtestlib/JXRTest.c b/jxrtestlib/JXRTest.c +index 43a7c99..77bf638 100644 +--- a/jxrtestlib/JXRTest.c ++++ b/jxrtestlib/JXRTest.c +@@ -198,7 +198,7 @@ ERR PKTestFactory_CreateDecoderFromFile(const char* szFilename, PKImageDecode** + ERR err = WMP_errSuccess; + + char *pExt = NULL; +- PKIID* pIID = NULL; ++ const PKIID* pIID = NULL; + + struct WMPStream* pStream = NULL; + PKImageDecode* pDecoder = NULL; +@@ -214,7 +214,7 @@ ERR PKTestFactory_CreateDecoderFromFile(const char* szFilename, PKImageDecode** + Call(CreateWS_File(&pStream, szFilename, "rb")); + + // Create decoder +- Call(PKTestFactory_CreateCodec(pIID, ppDecoder)); ++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppDecoder)); + pDecoder = *ppDecoder; + + // attach stream to decoder +@@ -232,7 +232,7 @@ ERR PKCreateTestFactory(PKCodecFactory** ppCFactory, U32 uVersion) + + UNREFERENCED_PARAMETER( uVersion ); + +- Call(PKAlloc(ppCFactory, sizeof(**ppCFactory))); ++ Call(PKAlloc((void**)ppCFactory, sizeof(**ppCFactory))); + pCFactory = *ppCFactory; + + pCFactory->CreateCodec = PKTestFactory_CreateCodec; +@@ -287,7 +287,7 @@ ERR PKTestDecode_Release( + + pID->fStreamOwner && pID->pStream->Close(&pID->pStream); + +- return PKFree(ppID); ++ return PKFree((void**)ppID); + } + + ERR PKTestDecode_Create( +@@ -296,7 +296,7 @@ ERR PKTestDecode_Create( + ERR err = WMP_errSuccess; + PKTestDecode* pID = NULL; + +- Call(PKAlloc(ppID, sizeof(**ppID))); ++ Call(PKAlloc((void**)ppID, sizeof(**ppID))); + + pID = *ppID; + pID->Initialize = PKTestDecode_Initialize; +diff --git a/jxrtestlib/JXRTestTif.c b/jxrtestlib/JXRTestTif.c +index 39f619d..a288fdf 100644 +--- a/jxrtestlib/JXRTestTif.c ++++ b/jxrtestlib/JXRTestTif.c +@@ -909,8 +909,8 @@ ERR PKImageDecode_Release_TIF(PKTestDecode** ppID) + + PKTestDecode *pID = *ppID; + +- Call(WMPFree(&pID->EXT.TIF.uStripOffsets)); +- Call(WMPFree(&pID->EXT.TIF.uStripByteCounts)); ++ Call(WMPFree((void**)&pID->EXT.TIF.uStripOffsets)); ++ Call(WMPFree((void**)&pID->EXT.TIF.uStripByteCounts)); + + Call(PKTestDecode_Release(ppID)); +