File jxrlib_warnings.patch of Package jxrlib
xxxxxxxxxx
1
diff -rupN jxrlib/image/sys/common.h jxrlib-new/image/sys/common.h
2
--- jxrlib/image/sys/common.h 2013-03-21 17:30:54.000000000 +0100
3
+++ jxrlib-new/image/sys/common.h 2015-09-03 10:31:06.528657911 +0200
4
5
Void AdaptFixed (CAdaptiveHuffman *pAdHuff);
6
Void AdaptDiscriminant (CAdaptiveHuffman *pAdHuff);
7
8
-#ifndef _PREFAST_
9
-#pragma warning(disable:4068)
10
-#endif
11
+// #ifndef _PREFAST_
12
+// #pragma warning(disable:4068)
13
+// #endif
14
15
#endif // WMI_COMMON_H
16
diff -rupN jxrlib/image/sys/strcodec.c jxrlib-new/image/sys/strcodec.c
17
--- jxrlib/image/sys/strcodec.c 2013-03-20 19:16:21.000000000 +0100
18
+++ jxrlib-new/image/sys/strcodec.c 2015-09-03 10:30:31.018971760 +0200
19
20
// WinCE ARM and Desktop x86
21
#else
22
// other platform
23
-#ifdef _BIG__ENDIAN_
24
-#define _byteswap_ulong(x) (x)
25
-#else // _BIG__ENDIAN_
26
+#ifndef _BIG__ENDIAN_
27
U32 _byteswap_ulong(U32 bits)
28
{
29
U32 r = (bits & 0xffu) << 24;
30
diff -rupN jxrlib/image/sys/strcodec.h jxrlib-new/image/sys/strcodec.h
31
--- jxrlib/image/sys/strcodec.h 2013-03-21 19:22:34.000000000 +0100
32
+++ jxrlib-new/image/sys/strcodec.h 2015-09-03 10:30:31.019971779 +0200
33
34
35
#ifndef UNREFERENCED_PARAMETER
36
#define UNREFERENCED_PARAMETER(P) { (P) = (P); }
37
-#endif UNREFERENCED_PARAMETER
38
+#endif // UNREFERENCED_PARAMETER
39
40
#ifdef UNDER_CE
41
#define PLATFORM_WCE
42
43
pIO->cBitsUsed &= 16 - 1;\
44
pIO->uiAccumulator = LOAD16(pIO->pbCurrent) << pIO->cBitsUsed;\
45
return 0;
46
-// pIO->uiAccumulator = LOAD16(pIO->pbCurrent) & ((U32)(-1) >> pIO->cBitsUsed);\
47
48
void OutputPerfTimerReport(CWMImageStrCodec *pState);
49
+
50
+#if (defined(WIN32) && !defined(UNDER_CE)) || (defined(UNDER_CE) && defined(_ARM_))
51
+// WinCE ARM and Desktop x86
52
+#else
53
+// other platform
54
+#ifdef _BIG__ENDIAN_
55
+#define _byteswap_ulong(x) (x)
56
+#else // _BIG__ENDIAN_
57
+U32 _byteswap_ulong(U32 bits);
58
+#endif // _BIG__ENDIAN_
59
+#endif
60
\ No newline at end of file
61
diff -rupN jxrlib/jxrencoderdecoder/JxrDecApp.c jxrlib-new/jxrencoderdecoder/JxrDecApp.c
62
--- jxrlib/jxrencoderdecoder/JxrDecApp.c 2013-05-08 18:45:08.000000000 +0200
63
+++ jxrlib-new/jxrencoderdecoder/JxrDecApp.c 2015-09-03 10:30:31.019971779 +0200
64
65
Call(GetTestEncodeIID(szExt, &pIID));
66
67
// Create encoder
68
- Call(PKTestFactory_CreateCodec(pIID, ppIE));
69
+ Call(PKTestFactory_CreateCodec(pIID, (void**)ppIE));
70
71
Cleanup:
72
return err;
73
diff -rupN jxrlib/jxrencoderdecoder/JxrEncApp.c jxrlib-new/jxrencoderdecoder/JxrEncApp.c
74
--- jxrlib/jxrencoderdecoder/JxrEncApp.c 2013-05-28 20:58:22.000000000 +0200
75
+++ jxrlib-new/jxrencoderdecoder/JxrEncApp.c 2015-09-03 10:30:31.020971798 +0200
76
77
78
//================================
79
Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION));
80
- Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, &pEncoder));
81
+ Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, (void**)&pEncoder));
82
83
//----------------------------------------------------------------
84
Call(PKCreateTestFactory(&pTestFactory, WMP_SDK_VERSION));
85
diff -rupN jxrlib/jxrgluelib/JXRGlueJxr.c jxrlib-new/jxrgluelib/JXRGlueJxr.c
86
--- jxrlib/jxrgluelib/JXRGlueJxr.c 2013-03-20 20:01:13.000000000 +0100
87
+++ jxrlib-new/jxrgluelib/JXRGlueJxr.c 2015-09-03 10:30:31.021971818 +0200
88
89
//*@@@---@@@@******************************************************************
90
#include <limits.h>
91
#include <JXRGlue.h>
92
+#include <wchar.h>
93
94
95
static const char szHDPhotoFormat[] = "<dc:format>image/vnd.ms-photo</dc:format>";
96
diff -rupN jxrlib/jxrgluelib/JXRMeta.h jxrlib-new/jxrgluelib/JXRMeta.h
97
--- jxrlib/jxrgluelib/JXRMeta.h 2013-03-20 19:06:24.000000000 +0100
98
+++ jxrlib-new/jxrgluelib/JXRMeta.h 2015-09-03 10:30:31.021971818 +0200
99
100
101
#ifndef UNREFERENCED_PARAMETER
102
#define UNREFERENCED_PARAMETER(P) { (P) = (P); }
103
-#endif UNREFERENCED_PARAMETER
104
+#endif // UNREFERENCED_PARAMETER
105
106
//================================================================
107
// Container
108
diff -rupN jxrlib/jxrtestlib/JXRTest.c jxrlib-new/jxrtestlib/JXRTest.c
109
--- jxrlib/jxrtestlib/JXRTest.c 2013-03-19 20:06:18.000000000 +0100
110
+++ jxrlib-new/jxrtestlib/JXRTest.c 2015-09-03 10:30:31.022971837 +0200
111
112
ERR err = WMP_errSuccess;
113
114
char *pExt = NULL;
115
- PKIID* pIID = NULL;
116
+ const PKIID* pIID = NULL;
117
118
struct WMPStream* pStream = NULL;
119
PKImageDecode* pDecoder = NULL;
120
121
Call(CreateWS_File(&pStream, szFilename, "rb"));
122
123
// Create decoder
124
- Call(PKTestFactory_CreateCodec(pIID, ppDecoder));
125
+ Call(PKTestFactory_CreateCodec(pIID, (void**)ppDecoder));
126
pDecoder = *ppDecoder;
127
128
// attach stream to decoder
129
130
131
UNREFERENCED_PARAMETER( uVersion );
132
133
- Call(PKAlloc(ppCFactory, sizeof(**ppCFactory)));
134
+ Call(PKAlloc((void**)ppCFactory, sizeof(**ppCFactory)));
135
pCFactory = *ppCFactory;
136
137
pCFactory->CreateCodec = PKTestFactory_CreateCodec;
138
139
140
pID->fStreamOwner && pID->pStream->Close(&pID->pStream);
141
142
- return PKFree(ppID);
143
+ return PKFree((void**)ppID);
144
}
145
146
ERR PKTestDecode_Create(
147
148
ERR err = WMP_errSuccess;
149
PKTestDecode* pID = NULL;
150
151
- Call(PKAlloc(ppID, sizeof(**ppID)));
152
+ Call(PKAlloc((void**)ppID, sizeof(**ppID)));
153
154
pID = *ppID;
155
pID->Initialize = PKTestDecode_Initialize;
156
diff -rupN jxrlib/jxrtestlib/JXRTestHdr.c jxrlib-new/jxrtestlib/JXRTestHdr.c
157
--- jxrlib/jxrtestlib/JXRTestHdr.c 2013-03-20 17:40:08.000000000 +0100
158
+++ jxrlib-new/jxrtestlib/JXRTestHdr.c 2015-09-03 10:30:31.022971837 +0200
159
160
//*@@@---@@@@******************************************************************
161
#ifndef ANSI
162
#define _CRT_SECURE_NO_WARNINGS
163
-#endif ANSI
164
+#endif // ANSI
165
166
#include <stdlib.h>
167
#include <string.h>
168
diff -rupN jxrlib/jxrtestlib/JXRTestPnm.c jxrlib-new/jxrtestlib/JXRTestPnm.c
169
--- jxrlib/jxrtestlib/JXRTestPnm.c 2013-03-19 22:43:44.000000000 +0100
170
+++ jxrlib-new/jxrtestlib/JXRTestPnm.c 2015-09-03 10:30:31.023971856 +0200
171
172
//*@@@---@@@@******************************************************************
173
#ifndef ANSI
174
#define _CRT_SECURE_NO_WARNINGS
175
-#endif ANSI
176
+#endif // ANSI
177
178
#include <stdlib.h>
179
180
diff -rupN jxrlib/jxrtestlib/JXRTestTif.c jxrlib-new/jxrtestlib/JXRTestTif.c
181
--- jxrlib/jxrtestlib/JXRTestTif.c 2013-03-19 20:17:12.000000000 +0100
182
+++ jxrlib-new/jxrtestlib/JXRTestTif.c 2015-09-03 10:30:31.023971856 +0200
183
184
185
PKTestDecode *pID = *ppID;
186
187
- Call(WMPFree(&pID->EXT.TIF.uStripOffsets));
188
- Call(WMPFree(&pID->EXT.TIF.uStripByteCounts));
189
+ Call(WMPFree((void**)&pID->EXT.TIF.uStripOffsets));
190
+ Call(WMPFree((void**)&pID->EXT.TIF.uStripByteCounts));
191
192
Call(PKTestDecode_Release(ppID));
193
194