[irstlm] 80/146: Updated 1002_fix_problems_identified_by_cppcheck.patch.

Giulio Paci giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:37:10 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 5dcb1ee8c9b5aef1abb7ff51b922b9ca4c040294
Author: Giulio Paci <giuliopaci at gmail.com>
Date:   Sat May 4 19:46:20 2013 +0200

    Updated 1002_fix_problems_identified_by_cppcheck.patch.
---
 .../1002_fix_problems_identified_by_cppcheck.patch | 38 +++++++++++++++++-----
 1 file changed, 30 insertions(+), 8 deletions(-)

diff --git a/debian/patches/1002_fix_problems_identified_by_cppcheck.patch b/debian/patches/1002_fix_problems_identified_by_cppcheck.patch
index d8a15ca..648c1a0 100644
--- a/debian/patches/1002_fix_problems_identified_by_cppcheck.patch
+++ b/debian/patches/1002_fix_problems_identified_by_cppcheck.patch
@@ -97,7 +97,7 @@ Forwarded: yes
  
 --- a/src/mfstream.h
 +++ b/src/mfstream.h
-@@ -221,6 +221,7 @@
+@@ -225,6 +225,7 @@
        cerr << "close/open " << a <<"\n";
        close();
        open(a,ios::in);
@@ -107,17 +107,17 @@ Forwarded: yes
  
 --- a/src/prune-lm.cpp
 +++ b/src/prune-lm.cpp
-@@ -113,6 +113,7 @@
+@@ -68,6 +68,7 @@
    thr[0]=0;
    for(i=1,tk=strtok(s, ","); tk; tk=strtok(0, ","),i++) thr[i]=atof(tk);
    for(; i<MAX_NGRAM; i++) thr[i]=thr[i-1];
 +  free(s);
  }
  
- int main(int argc, const char **argv)
+ int main(int argc, char **argv)
 --- a/src/util.cpp
 +++ b/src/util.cpp
-@@ -131,7 +131,7 @@
+@@ -143,7 +143,7 @@
  
  void *MMap(int	fd, int	access, off_t	offset, size_t	len, off_t	*gap)
  {
@@ -202,7 +202,7 @@ Forwarded: yes
      }
 --- a/src/compile-lm.cpp
 +++ b/src/compile-lm.cpp
-@@ -232,7 +232,7 @@
+@@ -175,7 +175,7 @@
    //checking the language model type
    lmContainer* lmt=NULL;
  
@@ -213,7 +213,7 @@ Forwarded: yes
    if (invert) lmt->is_inverted(invert);
 --- a/src/interpolate-lm.cpp
 +++ b/src/interpolate-lm.cpp
-@@ -599,7 +599,7 @@
+@@ -552,7 +552,7 @@
  {
    lmContainer* lmt=NULL;
  
@@ -246,12 +246,34 @@ Forwarded: yes
      UNUSED(code);
 --- a/src/plsa.cpp
 +++ b/src/plsa.cpp
-@@ -250,7 +250,7 @@
+@@ -234,7 +234,7 @@
      tc.train(adafile,it,.0);
    }
    if (strcmp(hfile,"hfff")==0)  system("rm -f hfff");
 -  delete hfile;
 +  delete[] hfile;
- 
+ 	
    exit(1);
  }
+--- a/src/ngramtable.cpp
++++ b/src/ngramtable.cpp
+@@ -526,7 +526,7 @@
+ {
+   mfstream inp(filename,ios::in);
+   int i,c=0;
+-  int selmask[MAX_NGRAM];
++  int selmask[MAX_NGRAM] = { 0 };
+ 
+   if (!inp) {
+     cerr << "cannot open " << filename << "\n";
+--- a/src/ngt.cpp
++++ b/src/ngt.cpp
+@@ -291,7 +291,7 @@
+          << " according to hmask\n";
+ 
+     int i,c;
+-    int selmask[MAX_NGRAM];
++    int selmask[MAX_NGRAM] = { 0 };
+ 
+     //parse hmask
+     i=0;

-- 
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