[med-svn] [grabix] 03/11: Fixed uninitialised values, corrected cast.

Andreas Tille tille at debian.org
Thu Dec 7 18:56:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository grabix.

commit db939c8d63dc0c403ef8161442101ebc47513d85
Author: Steffen Moeller <moeller at debian.org>
Date:   Thu Jul 18 14:53:17 2013 +0000

    Fixed uninitialised values, corrected cast.
---
 debian/patches/series         |  2 ++
 debian/patches/warnings.patch | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 547c0fb..0bca6c9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 Hardening.patch
+warnings.patch
+
diff --git a/debian/patches/warnings.patch b/debian/patches/warnings.patch
new file mode 100644
index 0000000..5409ce7
--- /dev/null
+++ b/debian/patches/warnings.patch
@@ -0,0 +1,29 @@
+Index: grabix-0.0~git20130718/grabix.cpp
+===================================================================
+--- grabix-0.0~git20130718.orig/grabix.cpp
++++ grabix-0.0~git20130718/grabix.cpp
+@@ -261,7 +261,7 @@
+         srand(seed);
+         
+         // reservoir sample
+-        size_t s, N, result_size;
++        uint64_t N=0, result_size=0;
+         vector<string> sample;
+         kstring_t *line;
+         line = new kstring_t;
+@@ -282,7 +282,7 @@
+             }
+             else 
+             {
+-                s = (int) ((double)rand()/(double)RAND_MAX * N);
++                uint64_t s = (uint64_t) ((double)rand()/(double)RAND_MAX * N);
+                 if (s < K)
+                     sample[s] = line->s;
+             }
+@@ -327,4 +327,4 @@
+     }
+ 
+     return EXIT_SUCCESS;
+-}
+\ No newline at end of file
++}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/grabix.git



More information about the debian-med-commit mailing list