[irstlm] 63/146: Added 1001_fix_compilation_warnings.patch.
Giulio Paci
giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:37:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
giuliopaci-guest pushed a commit to branch master
in repository irstlm.
commit 94820de2fc70790fff2e76df3a5f74a3d78e421d
Author: Giulio Paci <giuliopaci at gmail.com>
Date: Sat Jan 5 20:01:28 2013 +0100
Added 1001_fix_compilation_warnings.patch.
---
debian/patches/1001_fix_compilation_warnings.patch | 152 +++++++++++++++++++++
1 file changed, 152 insertions(+)
diff --git a/debian/patches/1001_fix_compilation_warnings.patch b/debian/patches/1001_fix_compilation_warnings.patch
new file mode 100644
index 0000000..0cf46ab
--- /dev/null
+++ b/debian/patches/1001_fix_compilation_warnings.patch
@@ -0,0 +1,152 @@
+Description: fix some compiler warnings
+Author: Giulio Paci <giuliopaci at gmail.com>
+Forwarded: yes
+--- a/src/compile-lm.cpp
++++ b/src/compile-lm.cpp
+@@ -180,13 +180,13 @@
+ bool invert = (sinvert == "yes"? true : false);
+
+ //Define output type of table
+- OUTFILE_TYPE outtype;
+- if (textoutput)
+- outtype=TEXT;
+- else if (seval != "" || sscore == "yes")
+- outtype=NONE;
+- else
+- outtype=BINARY;
++ //OUTFILE_TYPE outtype;
++ //if (textoutput)
++ // outtype=TEXT;
++ //else if (seval != "" || sscore == "yes")
++ // outtype=NONE;
++ //else
++ // outtype=BINARY;
+
+
+ int debug = atoi(sdebug.c_str());
+--- a/src/lmInterpolation.cpp
++++ b/src/lmInterpolation.cpp
+@@ -91,10 +91,12 @@
+
+ //check whether the (textual) LM has to be loaded as inverted
+ m_isinverted[i] = false;
++#if MAX_TOKEN > 2
+ if(tokenN == 3) {
+ if (strcmp(words[2],"inverted") == 0)
+ m_isinverted[i] = true;
+ }
++#endif
+ VERBOSE(2,"i:" << i << " m_isinverted[i]:" << m_isinverted[i] << endl);
+
+ m_weight[i] = (float) atof(words[0]);
+--- a/src/lmtable.cpp
++++ b/src/lmtable.cpp
+@@ -723,7 +723,7 @@
+ if (parseline(inp,level,ng,prob,bow)) {
+
+ // if table is inverted then revert n-gram
+- if (isInverted & level>1) {
++ if ((isInverted & level)>1) {
+ ing.invert(ng);
+ ng=ing;
+ }
+@@ -1611,7 +1611,9 @@
+ table_entry_pos_t offset=0,limit=cursize[1];
+
+ //information of table entries
++#ifdef LMT_CACHE_ENABLE
+ table_entry_pos_t hit;
++#endif
+ char* found;
+ LMT_TYPE ndt;
+ ng.link=NULL;
+@@ -1620,11 +1622,11 @@
+ for (int l=1; l<=lev; l++) {
+
+ //initialize entry information
+- hit = 0 ;
+ found = NULL;
+ ndt=tbltype[l];
+
+ #ifdef LMT_CACHE_ENABLE
++ hit = 0 ;
+ if (lmtcache[l] && lmtcache[l]->get(ng.wordp(n),found)) {
+ hit=1;
+ } else {
+@@ -1732,7 +1734,7 @@
+ out << ipr <<"\t";
+
+ // if table is inverted then revert n-gram
+- if (isInverted & ng.size>1) {
++ if ((isInverted & ng.size)>1) {
+ ing.invert(ng);
+ for (int k=ing.size; k>=1; k--) {
+ if (k<ing.size) out << " ";
+@@ -2269,9 +2271,6 @@
+
+ ng.size=0;
+
+- double tlk, bo, ts, tbs;
+- tlk = bo = ts = tbs = 0;
+-
+ for(l=2; l<=maxlev; l++) wdprune(thr, aflag, ng, 1, l, 0, cursize[1]);
+ return 0;
+ }
+--- a/src/ngramtable.h
++++ b/src/ngramtable.h
+@@ -664,11 +664,12 @@
+ }
+
+ table mtable(node nd) {
+- char v[PTRSIZE];;
++ table t;
++ char *v=(char *)&t;
+ for (int i=0; i<PTRSIZE; i++)
+ v[i]=nd[MTAB_OFFS+i];
+
+- return *(table *)v;
++ return t;
+ }
+
+ table mtable(node nd,table value) {
+--- a/src/cplsa.cpp
++++ b/src/cplsa.cpp
+@@ -282,7 +282,7 @@
+
+ //start of training
+
+- double lastLL=10;
++ // double lastLL=10;
+ double LL=-1e+99;
+
+ int iter=0;
+@@ -292,7 +292,7 @@
+ while (iter < maxiter)
+ //while ( (iter < maxiter) && (((lastLL-LL)/lastLL)>0.00001))
+ {
+- lastLL=LL;
++ // lastLL=LL;
+ LL=0;
+
+ if (flagW) //reset support arrays
+--- a/src/shiftlm.cpp
++++ b/src/shiftlm.cpp
+@@ -533,12 +533,12 @@
+
+ assert(size<=2); // only works with bigrams //
+
+- if (size == 3) {
+-
+- ngram history=ng;
+-
+-
+- }
++ // if (size == 3) {
++ //
++ // ngram history=ng;
++ //
++ //
++ // }
+ if (size == 2) {
+
+ //compute unigram probability of denominator
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/irstlm.git
More information about the debian-science-commits
mailing list