summaryrefslogtreecommitdiff
path: root/debian/patches/16_gcc4.6_sword.patch
blob: 9e3209540bfa423e57b7c0b0f36c1882b2a9fead (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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
Description: gcc-4.6 -Wunused-but-set-variable fixes
Origin: commit, revision id: dmitrijs.ledkovs@credativ.co.uk-20110805200647-l3i6n1uwjuyjv525
Author: Dmitrijs Ledkovs <dmitrijs.ledkovs@credativ.co.uk>
Last-Update: 2011-08-05
X-Bzr-Revision-Id: dmitrijs.ledkovs@credativ.co.uk-20110805200647-l3i6n1uwjuyjv525

=== modified file 'src/mgr/swmgr.cpp'
Index: debian/src/mgr/swmgr.cpp
===================================================================
--- debian.orig/src/mgr/swmgr.cpp
+++ debian/src/mgr/swmgr.cpp
@@ -889,7 +889,6 @@ SWModule *SWMgr::CreateMod(const char *n
 	if ((!stricmp(driver, "zText")) || (!stricmp(driver, "zCom"))) {
 		SWCompress *compress = 0;
 		int blockType = CHAPTERBLOCKS;
-		int blockNum = 1;
 		misc1 = ((entry = section.find("BlockType")) != section.end()) ? (*entry).second : (SWBuf)"CHAPTER";
 		if (!stricmp(misc1.c_str(), "VERSE"))
 			blockType = VERSEBLOCKS;
@@ -898,9 +897,6 @@ SWModule *SWMgr::CreateMod(const char *n
 		else if (!stricmp(misc1.c_str(), "BOOK"))
 			blockType = BOOKBLOCKS;
 		
-		misc1 = ((entry = section.find("BlockNumber")) != section.end()) ? (*entry).second : (SWBuf)"1";
-		blockNum = atoi(misc1.c_str());
-
 		misc1 = ((entry = section.find("CompressType")) != section.end()) ? (*entry).second : (SWBuf)"LZSS";
 #ifndef EXCLUDEZLIB
 		if (!stricmp(misc1.c_str(), "ZIP"))
Index: debian/src/modules/filters/gbfrtf.cpp
===================================================================
--- debian.orig/src/modules/filters/gbfrtf.cpp
+++ debian/src/modules/filters/gbfrtf.cpp
@@ -42,7 +42,6 @@ char GBFRTF::processText(SWBuf &text, co
 	SWBuf strongnum;
 	SWBuf strongtense;
 	bool hideText = false;
-	int wordLen = 0;
 	int wordCount = 0;
 
 	const char *from;
@@ -50,7 +49,6 @@ char GBFRTF::processText(SWBuf &text, co
 	from = orig.c_str();
 	for (text = ""; *from; from++) {
 		if (*from == '<') {
-			wordLen = wordCount;
 			wordCount = 0;
 			intoken = true;
 			tokpos = 0;
Index: debian/src/modules/filters/gbfwordjs.cpp
===================================================================
--- debian.orig/src/modules/filters/gbfwordjs.cpp
+++ debian/src/modules/filters/gbfwordjs.cpp
@@ -57,7 +57,6 @@ char GBFWordJS::processText(SWBuf &text,
 		char token[2112]; // cheese.  Fix.
 		int tokpos = 0;
 		bool intoken = false;
-		bool lastspace = false;
 		int word = 1;
 		char val[128];
 		char wordstr[5];
@@ -152,14 +151,11 @@ char GBFWordJS::processText(SWBuf &text,
 						else strong << 1;
 
 						SWModule *sLex = 0;
-						SWModule *sMorph = 0;
 						if (gh == 'G') {
 							sLex = defaultGreekLex;
-							sMorph = defaultGreekParse;
 						}
 						if (gh == 'H') {
 							sLex = defaultHebLex;
-							sMorph = defaultHebParse;
 						}
 						SWBuf lexName = "";
 						if (sLex) {
@@ -223,7 +219,6 @@ char GBFWordJS::processText(SWBuf &text,
 			}
 			else	{
 				text += *from;
-				lastspace = (*from == ' ');
 			}
 		}
 
Index: debian/src/modules/filters/osislemma.cpp
===================================================================
--- debian.orig/src/modules/filters/osislemma.cpp
+++ debian/src/modules/filters/osislemma.cpp
@@ -44,7 +44,6 @@ OSISLemma::~OSISLemma() {
 char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
 	SWBuf token;
 	bool intoken = false;
-	bool lastspace = false;
 
 	const SWBuf orig = text;
 	const char * from = orig.c_str();
@@ -90,7 +89,6 @@ char OSISLemma::processText(SWBuf &text,
 			}
 			else	{
 				text.append(*from);
-				lastspace = (*from == ' ');
 			}
 		}
 	}
Index: debian/src/modules/filters/osismorph.cpp
===================================================================
--- debian.orig/src/modules/filters/osismorph.cpp
+++ debian/src/modules/filters/osismorph.cpp
@@ -45,7 +45,6 @@ char OSISMorph::processText(SWBuf &text,
 		char token[2048]; // cheese.  Fix.
 		int tokpos = 0;
 		bool intoken = false;
-		bool lastspace = false;
 		SWBuf orig = text;
 		const char *from = orig.c_str();
 		
@@ -90,7 +89,6 @@ char OSISMorph::processText(SWBuf &text,
 			}
 			else	{
 				text.append(*from);
-				lastspace = (*from == ' ');
 			}
 		}
 	}
Index: debian/src/modules/filters/osisruby.cpp
===================================================================
--- debian.orig/src/modules/filters/osisruby.cpp
+++ debian/src/modules/filters/osisruby.cpp
@@ -44,7 +44,6 @@ OSISRuby::~OSISRuby() {
 char OSISRuby::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
 	SWBuf token;
 	bool intoken = false;
-	bool lastspace = false;
 
 	const SWBuf orig = text;
 	const char * from = orig.c_str();
@@ -83,7 +82,6 @@ char OSISRuby::processText(SWBuf &text,
 			}
 			else	{
 				text.append(*from);
-				lastspace = (*from == ' ');
 			}
 		}
 	}
Index: debian/src/modules/filters/osisstrongs.cpp
===================================================================
--- debian.orig/src/modules/filters/osisstrongs.cpp
+++ debian/src/modules/filters/osisstrongs.cpp
@@ -49,7 +49,6 @@ OSISStrongs::~OSISStrongs() {
 char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
 	SWBuf token;
 	bool intoken = false;
-	bool lastspace = false;
 	int wordNum = 1;
 	char wordstr[5];
 	const char *wordStart = 0;
@@ -280,7 +279,6 @@ char OSISStrongs::processText(SWBuf &tex
 		}
 		else	{
 			text.append(*from);
-			lastspace = (*from == ' ');
 		}
 	}
 	return 0;
Index: debian/src/modules/filters/osiswordjs.cpp
===================================================================
--- debian.orig/src/modules/filters/osiswordjs.cpp
+++ debian/src/modules/filters/osiswordjs.cpp
@@ -59,7 +59,6 @@ char OSISWordJS::processText(SWBuf &text
 		char token[2112]; // cheese.  Fix.
 		int tokpos = 0;
 		bool intoken = false;
-		bool lastspace = false;
 		int wordNum = 1;
 		char wordstr[5];
 		SWBuf modName = (module)?module->Name():"";
@@ -186,7 +185,6 @@ char OSISWordJS::processText(SWBuf &text
 			}
 			else	{
 				text.append(*from);
-				lastspace = (*from == ' ');
 			}
 		}
 	}
Index: debian/src/modules/filters/thmlwordjs.cpp
===================================================================
--- debian.orig/src/modules/filters/thmlwordjs.cpp
+++ debian/src/modules/filters/thmlwordjs.cpp
@@ -58,7 +58,6 @@ char ThMLWordJS::processText(SWBuf &text
 		char token[2112]; // cheese.  Fix.
 		int tokpos = 0;
 		bool intoken = false;
-		bool lastspace = false;
 		int word = 1;
 		char val[128];
 		char *valto;
@@ -166,14 +165,11 @@ char ThMLWordJS::processText(SWBuf &text
 						else strong << 1;
 
 						SWModule *sLex = 0;
-						SWModule *sMorph = 0;
 						if (gh == 'G') {
 							sLex = defaultGreekLex;
-							sMorph = defaultGreekParse;
 						}
 						if (gh == 'H') {
 							sLex = defaultHebLex;
-							sMorph = defaultHebParse;
 						}
 						SWBuf lexName = "";
 						if (sLex) {
@@ -204,16 +200,6 @@ char ThMLWordJS::processText(SWBuf &text
 							textStr += lastAppendLen;
 							SWBuf spanStart = "";
 
-
-
-/*
-							if (sMorph) {
-								SWBuf popMorph = "<a onclick=\"";
-								popMorph.appendFormatted("p(\'%s\',\'%s\','%s','');\" >%s</a>", sMorph->Name(), morph.c_str(), wordID.c_str(), morph.c_str());
-								morph = popMorph;
-							}
-*/
-
 							// 'p' = 'fillpop' to save bandwidth
 							const char *m = strchr(morph.c_str(), ':');
 							if (m) m++;
@@ -237,7 +223,6 @@ char ThMLWordJS::processText(SWBuf &text
 			}
 			else	{
 				text += *from;
-				lastspace = (*from == ' ');
 			}
 		}
 
Index: debian/src/modules/filters/utf8html.cpp
===================================================================
--- debian.orig/src/modules/filters/utf8html.cpp
+++ debian/src/modules/filters/utf8html.cpp
@@ -34,14 +34,11 @@ UTF8HTML::UTF8HTML() {
 char UTF8HTML::processText(SWBuf &text, const SWKey *key, const SWModule *module)
 {
 	unsigned char *from;
-	int len;
         char digit[10];
         unsigned long ch;
 	 if ((unsigned long)key < 2)	// hack, we're en(1)/de(0)ciphering
 		return (char)-1;
 
-	len = strlen(text.c_str()) + 2;						// shift string to right of buffer
-
 	SWBuf orig = text;
   	from = (unsigned char *)orig.c_str();
 
Index: debian/src/modules/filters/utf8latin1.cpp
===================================================================
--- debian.orig/src/modules/filters/utf8latin1.cpp
+++ debian/src/modules/filters/utf8latin1.cpp
@@ -36,14 +36,12 @@ char UTF8Latin1::processText(SWBuf &text
 {
   unsigned char *from;
 
-  int len;
   unsigned long uchar;
   unsigned char significantFirstBits, subsequent;
   
   if ((unsigned long)key < 2) {// hack, we're en(1)/de(0)ciphering
 	return (char)-1;
   }
-  len = strlen(text.c_str()) + 1;						// shift string to right of buffer
 
   SWBuf orig = text;
   from = (unsigned char*)orig.c_str();
Index: debian/src/utilfuns/url.cpp
===================================================================
--- debian.orig/src/utilfuns/url.cpp
+++ debian/src/utilfuns/url.cpp
@@ -133,7 +133,6 @@ void URL::parse () {
  //3.Get the hostname part. This is the part from pos up to the first slash
 	bool checkPath   = true;
 	bool checkParams = true;
-	bool checkAnchor = true;
 
 	end = strchr(urlPtr, '/');
 	if (!end) {
@@ -145,7 +144,6 @@ void URL::parse () {
 		end = strchr(urlPtr, '#');
 	}
 	if (!end) {
-		checkAnchor = false;
 		end = urlPtr+strlen(urlPtr);
 	}
 	 
@@ -160,7 +158,6 @@ void URL::parse () {
 			end = strchr(urlPtr, '#');
 		}
 		if (!end) {
-			checkAnchor = false;
 			end = urlPtr+strlen(urlPtr);
 		}
 
@@ -174,14 +171,6 @@ void URL::parse () {
 		SWBuf paramName;
 		SWBuf paramValue;
 				
-/*
-		end = strchr(urlPtr, '#');
-		if (!end) {
-			checkAnchor = false;
-			end = urlPtr+strlen(urlPtr);
-		}
-*/
-		//end = (start && strchr(start, '?')) ? strchr(start, '?')+1 :0;
 		end = urlPtr;
 		while (end) {
 			paramName = "";
Index: debian/utilities/osis2mod.cpp
===================================================================
--- debian.orig/utilities/osis2mod.cpp
+++ debian/utilities/osis2mod.cpp
@@ -1416,7 +1416,6 @@ int main(int argc, char **argv) {
 	const char* osisDoc    = argv[2];
 	int append             = 0;
 	SWBuf compType         = "";
-	bool isCommentary      = false;
 	int iType              = 4;
 	int entrySize          = 0;
 	SWBuf cipherKey        = "";
@@ -1464,9 +1463,6 @@ int main(int argc, char **argv) {
 			}
 			usage(*argv, "-s requires one of <2|4>");
 		}
-		else if (!strcmp(argv[i], "-C")) {
-			isCommentary = true;
-		}
 		else if (!strcmp(argv[i], "-d")) {
 			if (i+1 < argc) debug |= atoi(argv[++i]);
 			else usage(*argv, "-d requires <flags>");