diff options
Diffstat (limited to 'debian/patches/16_gcc4.6_sword.patch')
-rw-r--r-- | debian/patches/16_gcc4.6_sword.patch | 339 |
1 files changed, 339 insertions, 0 deletions
diff --git a/debian/patches/16_gcc4.6_sword.patch b/debian/patches/16_gcc4.6_sword.patch new file mode 100644 index 0000000..9e32095 --- /dev/null +++ b/debian/patches/16_gcc4.6_sword.patch @@ -0,0 +1,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>"); |