summaryrefslogtreecommitdiff
path: root/graphics/jxrlib/patches/patch-jxrtestlib_JXRTest.c
blob: 2f30a3d78e789905cfee2df519e679991c3eb444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$NetBSD: patch-jxrtestlib_JXRTest.c,v 1.1 2019/11/25 21:07:19 nros Exp $
* fix warnings, from FreeBSD ports
--- jxrtestlib/JXRTest.c.orig	2013-03-19 19:06:18.000000000 +0000
+++ jxrtestlib/JXRTest.c
@@ -198,7 +198,7 @@ ERR PKTestFactory_CreateDecoderFromFile(
     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(
     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**
 
     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;