Author: moeller
Date: 2013-07-18 14:53:17 +0000 (Thu, 18 Jul 2013)
New Revision: 14181

Added:
   trunk/packages/grabix/trunk/debian/patches/warnings.patch
Modified:
   trunk/packages/grabix/trunk/debian/patches/series
Log:
Fixed uninitialised values, corrected cast.


Modified: trunk/packages/grabix/trunk/debian/patches/series
===================================================================
--- trunk/packages/grabix/trunk/debian/patches/series   2013-07-18 14:36:24 UTC 
(rev 14180)
+++ trunk/packages/grabix/trunk/debian/patches/series   2013-07-18 14:53:17 UTC 
(rev 14181)
@@ -1 +1,3 @@
 Hardening.patch
+warnings.patch
+

Added: trunk/packages/grabix/trunk/debian/patches/warnings.patch
===================================================================
--- trunk/packages/grabix/trunk/debian/patches/warnings.patch                   
        (rev 0)
+++ trunk/packages/grabix/trunk/debian/patches/warnings.patch   2013-07-18 
14:53:17 UTC (rev 14181)
@@ -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
++}


_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to