summaryrefslogtreecommitdiff
path: root/libvisio/libvisio-0.0.1-warnings.patch
blob: 12b128f840969070ae7412d7c560c19afc6c1b6f (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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
--- misc/libvisio-0.0.1/src/lib/VSD11Parser.cpp	2011-06-23 16:38:31.000000000 +0200
+++ misc/build/libvisio-0.0.1/src/lib/VSD11Parser.cpp	2011-06-23 19:21:13.365713910 +0200
@@ -46,11 +46,10 @@
     return sColour;
 }
 
-const struct libvisio::VSD11Parser::StreamHandler libvisio::VSD11Parser::streamHandlers[] =
-{
+const libvisio::VSD11Parser::StreamHandler libvisio::VSD11Parser::streamHandlers[] = {
   {0xa, "Name", 0},
   {0xb, "Name Idx", 0},
-  {0x14, "Trailer, 0"},
+  {0x14, "Trailer", 0},
   {0x15, "Page", &libvisio::VSD11Parser::handlePage},
   {0x16, "Colors", &libvisio::VSD11Parser::handleColours},
   {0x17, "??? seems to have no data", 0},
@@ -58,7 +57,7 @@
   {0x1a, "Styles", 0},
   {0x1b, "??? saw 'Acrobat PDFWriter' string here", 0},
   {0x1c, "??? saw 'winspool.Acrobat PDFWriter.LPT1' string here", 0},
-  {0x1d, "Stencils"},
+  {0x1d, "Stencils", 0},
   {0x1e, "Stencil Page (collection of Shapes, one collection per each stencil item)", 0},
   {0x20, "??? seems to have no data", 0},
   {0x21, "??? seems to have no data", 0},
@@ -141,10 +140,10 @@
     ptrFormat = readU16(&trailerStream);
 
     int index = -1;
-    for (int i = 0; (index < 0) && streamHandlers[i].type; i++)
+    for (int j = 0; (index < 0) && streamHandlers[j].type; j++)
     {
-      if (streamHandlers[i].type == ptrType)
-        index = i;
+      if (streamHandlers[j].type == ptrType)
+        index = j;
     }
 
     if (index < 0)
@@ -199,10 +198,10 @@
     ptrFormat = readU16(&stream);
 
     int index = -1;
-    for (int i = 0; (index < 0) && streamHandlers[i].type; i++)
+    for (int j = 0; (index < 0) && streamHandlers[j].type; j++)
     {
-      if (streamHandlers[i].type == ptrType)
-        index = i;
+      if (streamHandlers[j].type == ptrType)
+        index = j;
     }
 
     if (index < 0)
@@ -225,8 +224,8 @@
 
         bool compressed = ((ptrFormat & 2) == 2);
         m_input->seek(ptrOffset, WPX_SEEK_SET);
-        VSDInternalStream stream(m_input, ptrLength, compressed);
-        (this->*streamHandler)(stream, painter);
+        VSDInternalStream tmpStream(m_input, ptrLength, compressed);
+        (this->*streamHandler)(tmpStream, painter);
       }
     }
   }
@@ -234,7 +233,7 @@
 
 void libvisio::VSD11Parser::handlePage(VSDInternalStream &stream, libwpg::WPGPaintInterface *painter)
 {
-  ChunkHeader header = {0};
+  ChunkHeader header;
   m_groupXForms.clear();
 
   while (!stream.atEOS())
@@ -294,11 +293,11 @@
   }
 }
 
-void libvisio::VSD11Parser::handleColours(VSDInternalStream &stream, libwpg::WPGPaintInterface *painter)
+void libvisio::VSD11Parser::handleColours(VSDInternalStream &stream, libwpg::WPGPaintInterface * /*painter*/)
 {
   stream.seek(6, WPX_SEEK_SET);
   unsigned int numColours = readU8(&stream);
-  Colour tmpColour = {0};
+  Colour tmpColour;
 
   stream.seek(1, WPX_SEEK_CUR);
 
@@ -318,10 +317,10 @@
   WPXPropertyListVector path;
   WPXPropertyList styleProps;
   WPXPropertyListVector gradientProps;
-  XForm xform = {0}; // Shape xform data
+  XForm xform; // Shape xform data
   unsigned int foreignType = 0; // Tracks current foreign data type
   unsigned int foreignFormat = 0; // Tracks foreign data format
-  ChunkHeader header = {0};
+  ChunkHeader header;
   unsigned long tmpBytesRead = 0;
   unsigned long streamPos = 0;
 
@@ -378,7 +377,7 @@
       stream.seek(1, WPX_SEEK_CUR);
       styleProps.insert("svg:stroke-width", m_scale*readDouble(&stream));
       stream.seek(1, WPX_SEEK_CUR);
-      Colour c = {0};
+      Colour c;
       c.r = readU8(&stream);
       c.g = readU8(&stream);
       c.b = readU8(&stream);
--- misc/libvisio-0.0.1/src/lib/VSD11Parser.h	2011-06-23 16:38:31.000000000 +0200
+++ misc/build/libvisio-0.0.1/src/lib/VSD11Parser.h	2011-06-23 18:34:24.733064592 +0200
@@ -41,7 +41,7 @@
 
   typedef void (VSD11Parser::*StreamMethod)(VSDInternalStream&, libwpg::WPGPaintInterface*);
   struct StreamHandler { unsigned int type; const char *name; StreamMethod handler;};
-  static const struct StreamHandler streamHandlers[32];
+  static const StreamHandler streamHandlers[];
 
   typedef void (VSD11Parser::*ChunkMethod)(VSDInternalStream&, libwpg::WPGPaintInterface*);
   struct ChunkHandler { unsigned int type; const char *name; ChunkMethod handler;};
--- misc/libvisio-0.0.1/src/lib/VSD6Parser.cpp	2011-06-23 16:38:31.000000000 +0200
+++ misc/build/libvisio-0.0.1/src/lib/VSD6Parser.cpp	2011-06-23 19:22:14.762503528 +0200
@@ -26,19 +26,18 @@
 #include "VSD6Parser.h"
 #include "VSDInternalStream.h"
 
-const struct libvisio::VSD6Parser::StreamHandler libvisio::VSD6Parser::handlers[] =
-{
+const libvisio::VSD6Parser::StreamHandler libvisio::VSD6Parser::handlers[] = {
   {0xa, "Name", 0},
   {0xb, "Name Idx", 0},
-  {0x14, "Trailer, 0"},
+  {0x14, "Trailer", 0},
   {0x15, "Page", &libvisio::VSD6Parser::handlePage},
-  {0x16, "Colors"},
+  {0x16, "Colors", 0},
   {0x17, "??? seems to have no data", 0},
   {0x18, "FontFaces (ver.11)", 0},
   {0x1a, "Styles", 0},
   {0x1b, "??? saw 'Acrobat PDFWriter' string here", 0},
   {0x1c, "??? saw 'winspool.Acrobat PDFWriter.LPT1' string here", 0},
-  {0x1d, "Stencils"},
+  {0x1d, "Stencils", 0},
   {0x1e, "Stencil Page (collection of Shapes, one collection per each stencil item)", 0},
   {0x20, "??? seems to have no data", 0},
   {0x21, "??? seems to have no data", 0},
@@ -113,10 +112,10 @@
     ptrFormat = readU16(&trailerStream);
 
     int index = -1;
-    for (int i = 0; (index < 0) && handlers[i].type; i++)
+    for (int j = 0; (index < 0) && handlers[j].type; j++)
     {
-      if (handlers[i].type == ptrType)
-        index = i;
+      if (handlers[j].type == ptrType)
+        index = j;
     }
 
     if (index < 0)
@@ -171,10 +170,10 @@
     ptrFormat = readU16(&stream);
 
     int index = -1;
-    for (int i = 0; (index < 0) && handlers[i].type; i++)
+    for (int j = 0; (index < 0) && handlers[j].type; j++)
     {
-      if (handlers[i].type == ptrType)
-        index = i;
+      if (handlers[j].type == ptrType)
+        index = j;
     }
 
     if (index < 0)
@@ -197,8 +196,8 @@
 
         bool compressed = ((ptrFormat & 2) == 2);
         m_input->seek(ptrOffset, WPX_SEEK_SET);
-        VSDInternalStream stream(m_input, ptrLength, compressed);
-        (this->*streamHandler)(stream, painter);
+        VSDInternalStream tmpStream(m_input, ptrLength, compressed);
+        (this->*streamHandler)(tmpStream, painter);
       }
     }
   }
@@ -207,7 +206,7 @@
 void libvisio::VSD6Parser::handlePage(VSDInternalStream &stream, libwpg::WPGPaintInterface *painter)
 {
   WPXPropertyList pageProps;
-  XForm xform = {0}; // Tracks current xform data
+  XForm xform; // Tracks current xform data
   unsigned int foreignType = 0; // Tracks current foreign data type
   unsigned int foreignFormat = 0; // Tracks foreign data format
   unsigned long tmpBytesRead = 0;
--- misc/libvisio-0.0.1/src/lib/VSD6Parser.h	2011-06-23 16:38:31.000000000 +0200
+++ misc/build/libvisio-0.0.1/src/lib/VSD6Parser.h	2011-06-23 18:35:03.491206892 +0200
@@ -41,7 +41,7 @@
 
   typedef void (VSD6Parser::*Method)(VSDInternalStream&, libwpg::WPGPaintInterface*);
   struct StreamHandler { unsigned int type; const char *name; Method handler;};
-  static const struct StreamHandler handlers[32];
+  static const StreamHandler handlers[];
   void handlePages(VSDInternalStream &stream, libwpg::WPGPaintInterface *painter);
   void handlePage(VSDInternalStream &stream, libwpg::WPGPaintInterface *painter);
 };
--- misc/libvisio-0.0.1/src/lib/VSDXParser.h	2011-06-23 16:38:31.000000000 +0200
+++ misc/build/libvisio-0.0.1/src/lib/VSDXParser.h	2011-06-23 19:18:51.492069602 +0200
@@ -53,6 +53,9 @@
     bool flipY;
     double x;
     double y;
+	XForm() : pinX(0.0), pinY(0.0), height(0.0), width(0.0),
+              pinLocX(0.0), pinLocY(0.0), angle(0.0),
+              flipX(false), flipY(false), x(0.0), y(0.0) {}
   };
 
   bool m_isPageStarted;