summaryrefslogtreecommitdiffstats
path: root/package/kodi-texturepacker/0002-fix_reallocarray.patch
blob: e32d09ef535b791955ab5ebe3e0f4e54aca0f025 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
From ebc5dfcad836936a14e6f18fd7faa377b3c804e7 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Mon, 6 Nov 2017 11:47:28 +0000
Subject: [PATCH] TexturePacker: use C++ headers

Signed-off-by: Dagg Stompler <daggs@gmx.com>
---
 tools/depends/native/TexturePacker/src/SimpleFS.h            | 4 ++--
 tools/depends/native/TexturePacker/src/TexturePacker.cpp     | 2 +-
 tools/depends/native/TexturePacker/src/XBTFWriter.cpp        | 6 +++---
 tools/depends/native/TexturePacker/src/XBTFWriter.h          | 2 +-
 tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp | 2 +-
 tools/depends/native/TexturePacker/src/md5.h                 | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/depends/native/TexturePacker/src/SimpleFS.h b/tools/depends/native/TexturePacker/src/SimpleFS.h
index c48814c0ad..c2288cf8de 100644
--- a/tools/depends/native/TexturePacker/src/SimpleFS.h
+++ b/tools/depends/native/TexturePacker/src/SimpleFS.h
@@ -20,9 +20,9 @@
  *
  */
 
-#include <stdio.h>
+#include <cstdio>
 #include <string>
-#include <stdint.h>
+#include <cstdint>
 
 class CFile
 {
diff --git a/tools/depends/native/TexturePacker/src/TexturePacker.cpp b/tools/depends/native/TexturePacker/src/TexturePacker.cpp
index ba618be574..045c5ce38d 100644
--- a/tools/depends/native/TexturePacker/src/TexturePacker.cpp
+++ b/tools/depends/native/TexturePacker/src/TexturePacker.cpp
@@ -22,7 +22,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #define __STDC_FORMAT_MACROS
-#include <inttypes.h>
+#include <cinttypes>
 #define platform_stricmp _stricmp
 #else
 #define platform_stricmp stricmp
diff --git a/tools/depends/native/TexturePacker/src/XBTFWriter.cpp b/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
index 9e2493369b..2e80ba674c 100644
--- a/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
+++ b/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
@@ -19,14 +19,14 @@
  */
 
 #define __STDC_FORMAT_MACROS
-#include <inttypes.h>
+#include <cinttypes>
 #if defined(TARGET_FREEBSD) || defined(TARGET_DARWIN)
-#include <stdlib.h>
+#include <cstdlib>
 #elif !defined(TARGET_DARWIN)
 #include <malloc.h>
 #endif
 #include <memory.h>
-#include <string.h>
+#include <cstring>
 
 #include "XBTFWriter.h"
 #include "guilib/XBTFReader.h"
diff --git a/tools/depends/native/TexturePacker/src/XBTFWriter.h b/tools/depends/native/TexturePacker/src/XBTFWriter.h
index 7509303a51..d5cf1a2965 100644
--- a/tools/depends/native/TexturePacker/src/XBTFWriter.h
+++ b/tools/depends/native/TexturePacker/src/XBTFWriter.h
@@ -23,7 +23,7 @@
 
 #include <vector>
 #include <string>
-#include <stdio.h>
+#include <cstdio>
 
 #include "guilib/XBTF.h"
 
diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
index 56c22f7c3a..3ddb20fe88 100644
--- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
@@ -20,7 +20,7 @@
 
 #include "GifHelper.h"
 #include <algorithm>
-#include <stdlib.h>
+#include <cstdlib>
 #include <cstring>
 
 #define UNSIGNED_LITTLE_ENDIAN(lo, hi)	((lo) | ((hi) << 8))
diff --git a/tools/depends/native/TexturePacker/src/md5.h b/tools/depends/native/TexturePacker/src/md5.h
index 456e5be17f..4bb48e0810 100644
--- a/tools/depends/native/TexturePacker/src/md5.h
+++ b/tools/depends/native/TexturePacker/src/md5.h
@@ -23,8 +23,8 @@
 #ifndef MD5_H
 #define MD5_H
 
-#include <string.h>		/* for memcpy() */
-#include <stdint.h>
+#include <cstring>		/* for memcpy() */
+#include <cstdint>
 
 struct MD5Context 
 {
-- 
2.16.0

From ff3e6dad5fdb7b9a2985b2547c8020c709af0340 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Mon, 6 Nov 2017 18:05:17 +0000
Subject: [PATCH] TexturePacker: drop unused variable

---
 tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp b/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp
index 53f5e9beb7..b0f18bed68 100644
--- a/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp
+++ b/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp
@@ -72,7 +72,6 @@ bool JPGDecoder::LoadFile(const std::string &filename, DecodedFrames &frames)
   struct jpeg_decompress_struct cinfo;
   struct jpeg_error_mgr jerr;
   
-  char *linha;
   int ImageSize;
   
   cinfo.err = jpeg_std_error(&jerr);
@@ -89,7 +88,6 @@ bool JPGDecoder::LoadFile(const std::string &filename, DecodedFrames &frames)
   DecodedFrame frame;
   
   frame.rgbaImage.pixels = (char *)new char[ImageSize];
-  linha = (char *)frame.rgbaImage.pixels;
   
   unsigned char *scanlinebuff = new unsigned char[3 * cinfo.image_width];
   unsigned char *dst = (unsigned char *)frame.rgbaImage.pixels;
-- 
2.16.0

From ee441543be07de1222bcff2587bfcdb5c1231989 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Mon, 6 Nov 2017 21:02:06 +0000
Subject: [PATCH] TexturePacker: include GifHelper after system headers

---
 tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
index 3ddb20fe88..9ced4ec5bc 100644
--- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
+++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp
@@ -18,10 +18,10 @@
  *
  */
 
-#include "GifHelper.h"
 #include <algorithm>
 #include <cstdlib>
 #include <cstring>
+#include "GifHelper.h"
 
 #define UNSIGNED_LITTLE_ENDIAN(lo, hi)	((lo) | ((hi) << 8))
 #define GIF_MAX_MEMORY 82944000U // about 79 MB, which is equivalent to 10 full hd frames.
-- 
2.16.0

OpenPOWER on IntegriCloud