]> git.pld-linux.org Git - packages/OpenNI2.git/blame - OpenNI2-nowarn.patch
- added defines patch (fix platform ifdefs, adjust to work in C++ with cleaner namesp...
[packages/OpenNI2.git] / OpenNI2-nowarn.patch
CommitLineData
b9bc5ba2
JB
1Avoid:
2"error: array subscript is below array bounds [-Werror=array-bounds]"
3"directive writing ... bytes into a region of size ... [-Werror=format-overflow=]"
4"error: ... may be used uninitialized in this function [-Werror=maybe-uninitialized]"
5--- OpenNI2-2.2-beta2/Source/Drivers/PS1080/Formats/XnFormatsMirror.cpp.orig 2013-11-12 15:12:23.000000000 +0100
6+++ OpenNI2-2.2-beta2/Source/Drivers/PS1080/Formats/XnFormatsMirror.cpp 2020-03-15 21:05:31.154704162 +0100
7@@ -43,7 +43,6 @@
8 XnUInt8* pSrcEnd = pSrc + nBufferSize;
9 XnUInt8* pDest = NULL;
10 XnUInt8* pDestVal = &pLineBuffer[0] + nLineSize - 1;
11- XnUInt8* pDestEnd = &pLineBuffer[0] - 1;
12
13 if (nLineSize > XN_MIRROR_MAX_LINE_SIZE)
14 {
15@@ -55,7 +54,7 @@
16 xnOSMemCopy(pLineBuffer, pSrc, nLineSize);
17
18 pDest = pDestVal;
19- while (pDest != pDestEnd)
20+ while (pDest >= pLineBuffer)
21 {
22 *pSrc = *pDest;
23
24@@ -76,7 +75,6 @@
25 XnUInt16* pSrcEnd = pSrc + nBufferSize / sizeof(XnUInt16);
26 XnUInt16* pDest = NULL;
27 XnUInt16* pDestVal = &pLineBuffer[0] + nLineSize - 1;
28- XnUInt16* pDestEnd = &pLineBuffer[0] - 1;
29 XnUInt16 nMemCpyLineSize = (XnUInt16)(nLineSize * sizeof(XnUInt16));
30 XnUInt16 nValue;
31
32@@ -90,7 +88,7 @@
33 xnOSMemCopy(pLineBuffer, pSrc, nMemCpyLineSize);
34
35 pDest = pDestVal;
36- while (pDest != pDestEnd)
37+ while (pDest >= pLineBuffer)
38 {
39 nValue = pDest[0];
40 pSrc[0] = nValue;
41@@ -112,7 +110,6 @@
42 XnUInt8* pSrcEnd = pSrc + nBufferSize;
43 XnUInt8* pDest = NULL;
44 XnUInt8* pDestVal = &pLineBuffer[0] + nLineSize * 3 - 1;
45- XnUInt8* pDestEnd = &pLineBuffer[0] - 1;
46 XnUInt16 nMemCpyLineSize = (XnUInt16)(nLineSize * 3);
47
48 if (nMemCpyLineSize > XN_MIRROR_MAX_LINE_SIZE)
49@@ -125,7 +122,7 @@
50 xnOSMemCopy(pLineBuffer, pSrc, nMemCpyLineSize);
51
52 pDest = pDestVal;
53- while (pDest != pDestEnd)
54+ while (pDest >= pLineBuffer)
55 {
56 *pSrc = *(pDest-2);
57 *(pSrc+1) = *(pDest-1);
58--- OpenNI2-2.2-beta2/Source/Drivers/PS1080/Sensor/XnFrameStreamProcessor.h.orig 2013-11-12 15:12:23.000000000 +0100
59+++ OpenNI2-2.2-beta2/Source/Drivers/PS1080/Sensor/XnFrameStreamProcessor.h 2020-03-15 21:15:21.744837994 +0100
60@@ -170,8 +170,8 @@
61 /* A pointer to the triple frame buffer of this stream. */
62 XnFrameBufferManager* m_pTripleBuffer;
63
64- XnChar m_csInDumpMask[100];
65- XnChar m_csInternalDumpMask[100];
66+ XnChar m_csInDumpMask[220];
67+ XnChar m_csInternalDumpMask[220];
68 XnDumpFile* m_InDump;
69 XnDumpFile* m_InternalDump;
70 XnBool m_bFrameCorrupted;
71--- OpenNI2-2.2-beta2/Source/Drivers/PS1080/Sensor/XnSensorFirmwareParams.cpp.orig 2013-11-12 15:12:23.000000000 +0100
72+++ OpenNI2-2.2-beta2/Source/Drivers/PS1080/Sensor/XnSensorFirmwareParams.cpp 2020-03-15 21:21:18.092907491 +0100
73@@ -262,7 +262,7 @@
74 nRetVal = m_AllFirmwareParams.Set(&Property, param);
75 XN_IS_STATUS_OK(nRetVal);
76
77- XnChar csNewName[XN_DEVICE_MAX_STRING_LENGTH];
78+ XnChar csNewName[XN_DEVICE_MAX_STRING_LENGTH + 10];
79 sprintf(csNewName, "%s (%d)", Property.GetName(), nFirmwareParam);
80
81 Property.UpdateName("Firmware", csNewName);
82--- OpenNI2-2.2-beta2/Source/Tools/NiViewer/Device.cpp.orig 2013-11-12 15:12:23.000000000 +0100
83+++ OpenNI2-2.2-beta2/Source/Tools/NiViewer/Device.cpp 2020-03-15 22:01:52.709718040 +0100
84@@ -364,7 +364,7 @@
85
86 void toggleCloseRange(int )
87 {
88- bool bCloseRange;
89+ bool bCloseRange = false;
90 g_depthStream.getProperty(XN_STREAM_PROPERTY_CLOSE_RANGE, &bCloseRange);
91
92 bCloseRange = !bCloseRange;
This page took 0.112019 seconds and 4 git commands to generate.