Skip to content

Commit

Permalink
Merge branch 'task/SDK-3908_fix_jxrlib_fedora' into 'release/v7.1.1'
Browse files Browse the repository at this point in the history
SDK-3908 Patch jxrlib for Fedora builds (Hotfix for v7.1.1)

See merge request sdk/sdk!5567
  • Loading branch information
aabellagm committed May 31, 2024
2 parents fd1e8c0 + 05a809c commit 898d2dd
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/cmake/vcpkg_overlay_ports/jxrlib/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
90 changes: 90 additions & 0 deletions contrib/cmake/vcpkg_overlay_ports/jxrlib/warnings.patch
Original file line number Diff line number Diff line change
@@ -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));

0 comments on commit 898d2dd

Please sign in to comment.