[med-svn] [Git][med-team/spaced][master] 2 commits: fix some build errors

Fabian Klötzl gitlab at salsa.debian.org
Mon Jul 9 14:41:34 BST 2018


Fabian Klötzl pushed to branch master at Debian Med / spaced


Commits:
0269ac6f by Fabian Klötzl at 2018-07-09T15:13:09+02:00
fix some build errors

- - - - -
2cd54e11 by Fabian Klötzl at 2018-07-09T15:37:48+02:00
patch more signedness issues

- - - - -


5 changed files:

- + debian/patches/0005-fix-absolute-value-of-unsigned.patch
- + debian/patches/0006-include-random-header.patch
- + debian/patches/0007-remove-stray-semicolon.patch
- + debian/patches/0008-fix-some-more-signedness-issues.patch
- debian/patches/series


Changes:

=====================================
debian/patches/0005-fix-absolute-value-of-unsigned.patch
=====================================
--- /dev/null
+++ b/debian/patches/0005-fix-absolute-value-of-unsigned.patch
@@ -0,0 +1,39 @@
+From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian at kloetzl.info>
+Date: Mon, 9 Jul 2018 14:49:11 +0200
+Subject: fix absolute value of unsigned
+
+---
+ src/patternset.cpp | 19 +++++++------------
+ 1 file changed, 7 insertions(+), 12 deletions(-)
+
+diff --git a/src/patternset.cpp b/src/patternset.cpp
+index 1b3e4f6..d859c92 100644
+--- a/src/patternset.cpp
++++ b/src/patternset.cpp
+@@ -188,19 +188,14 @@ void patternset::CheckParams(){
+ 		std::swap(max_dontcare,min_dontcare);
+ 	}
+ 	if(weight < 2){
+-		if(weight < 0){
+-			weight = std::abs(weight);
++		if(size != 1){
++			size = 1;
++			update = true;
+ 		}
+-		else{
+-			if(size != 1){
+-				size = 1;
+-				update = true;
+-			}
+-			if(max_dontcare != 0 || max_dontcare != 0){
+-				min_dontcare = 0;
+-				max_dontcare = 0;
+-				update = true;
+-			}
++		if(max_dontcare != 0 || max_dontcare != 0){
++			min_dontcare = 0;
++			max_dontcare = 0;
++			update = true;
+ 		}
+ 	}
+ 	if(weight == 2){


=====================================
debian/patches/0006-include-random-header.patch
=====================================
--- /dev/null
+++ b/debian/patches/0006-include-random-header.patch
@@ -0,0 +1,20 @@
+From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian at kloetzl.info>
+Date: Mon, 9 Jul 2018 14:50:32 +0200
+Subject: include random header
+
+---
+ src/patternset.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/patternset.cpp b/src/patternset.cpp
+index d859c92..a910b8a 100644
+--- a/src/patternset.cpp
++++ b/src/patternset.cpp
+@@ -18,6 +18,7 @@
+  * @author: Lars Hahn - 12.05.2016, Georg-August-Universitaet Goettingen
+  * @version: 1.2.0 05/2016
+  */
++#include <random>
+ #include "patternset.h"
+ 
+ 


=====================================
debian/patches/0007-remove-stray-semicolon.patch
=====================================
--- /dev/null
+++ b/debian/patches/0007-remove-stray-semicolon.patch
@@ -0,0 +1,21 @@
+From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian at kloetzl.info>
+Date: Mon, 9 Jul 2018 14:51:21 +0200
+Subject: remove stray semicolon
+
+---
+ src/spaced.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/spaced.cc b/src/spaced.cc
+index 649997b..3f46d2e 100644
+--- a/src/spaced.cc
++++ b/src/spaced.cc
+@@ -186,7 +186,7 @@ int main(int argc, char *argv[]){
+     for(unsigned long long i=0; i<n;i++){
+         c=toupper(str[i]);
+         if(c=='>'){
+-            while(str[++i]!='\n');
++            while(str[++i]!='\n')
+                 seq++;
+         }
+         if(isalpha(c)){


=====================================
debian/patches/0008-fix-some-more-signedness-issues.patch
=====================================
--- /dev/null
+++ b/debian/patches/0008-fix-some-more-signedness-issues.patch
@@ -0,0 +1,80 @@
+From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian at kloetzl.info>
+Date: Mon, 9 Jul 2018 15:28:43 +0200
+Subject: fix some more signedness issues
+
+---
+ src/patternset.cpp |  8 ++++----
+ src/sort.h         | 10 +++++-----
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/patternset.cpp b/src/patternset.cpp
+index a910b8a..55b9b25 100644
+--- a/src/patternset.cpp
++++ b/src/patternset.cpp
+@@ -456,13 +456,13 @@ bool patternset::VerifyPatternCondition(){
+ 
+ 	weight = first_weight;
+ 
+-	min_dontcare -= weight;
+-	max_dontcare -= weight;
+-
+-	if(min_dontcare < 0 || max_dontcare < 0){
++	if(min_dontcare < weight || max_dontcare < weight){
+ 		pattern_error = true;
+ 	}
+ 
++	min_dontcare -= weight;
++	max_dontcare -= weight;
++
+ 	return pattern_error;
+ }
+ 
+diff --git a/src/sort.h b/src/sort.h
+index 86ba729..8edaafd 100644
+--- a/src/sort.h
++++ b/src/sort.h
+@@ -80,7 +80,7 @@ void getFirstBits(vector<unsigned char>&pattern, unsigned char* firstBits, unsig
+ 	unsigned char p0,p1,p2,p3;
+ 	p0=pattern[0];p1=pattern[1];p2=pattern[2];p3=pattern[3];
+ 	if(weight>=4){
+-		for(int i=0; i<length;i++){
++		for(unsigned int i=0; i<length;i++){
+ 			w=0;
+ 			unsigned char* tmp=&seqData[i+pos];
+ 			w|=alphabet[*(tmp+p0)] << 6;
+@@ -93,7 +93,7 @@ void getFirstBits(vector<unsigned char>&pattern, unsigned char* firstBits, unsig
+ 	else if (weight==3){
+ 		unsigned char p0,p1,p2;
+ 		p0=pattern[0];p1=pattern[1];p2=pattern[2];
+-		for(int i=0; i<length;i++){
++		for(unsigned int i=0; i<length;i++){
+ 			w=0;
+ 			unsigned char* tmp=&seqData[i+pos];
+ 			w|=alphabet[*(tmp+p0)] << 4;
+@@ -105,7 +105,7 @@ void getFirstBits(vector<unsigned char>&pattern, unsigned char* firstBits, unsig
+ 	else if(weight==2){
+ 		unsigned char p0,p1;
+ 		p0=pattern[0];p1=pattern[1];
+-		for(int i=0; i<length;i++){
++		for(unsigned int i=0; i<length;i++){
+ 			w=0;
+ 			unsigned char* tmp=&seqData[i+pos];
+ 			w|=alphabet[*(tmp+p0)] << 2;
+@@ -117,7 +117,7 @@ void getFirstBits(vector<unsigned char>&pattern, unsigned char* firstBits, unsig
+ 	else{
+ 		unsigned char p0;
+ 		p0=pattern[0];
+-		for(int i=0; i<length;i++){
++		for(unsigned int i=0; i<length;i++){
+ 			unsigned char* tmp=&seqData[i+pos];
+ 			w=alphabet[*(tmp+p0)];
+ 			firstBits[i]=w;
+@@ -217,7 +217,7 @@ void spacedDNA(vector<string>& patternSet, unsigned char* seqData, uint n, int d
+ 	sequences.back().seqWordEnd=totalSeqLength-(weight+dontCare)+1;
+ 	seqNum=sequences.size();
+ 	uint cnt=0;
+-	for(uint i=0; i<seqNum;i++){
++	for(int i=0; i<seqNum;i++){
+ 		uint start=sequences[i].seqStart;
+ 		uint end=sequences[i].seqEnd-1;
+ 		sequences[i].revCompStart=cnt+totalSeqLength;


=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,7 @@
 0002-Fix-FTBFS-without-OpenMP.patch
 0003-Add-autotools-buildsystem.patch
 0004-signed.patch
+0005-fix-absolute-value-of-unsigned.patch
+0006-include-random-header.patch
+0007-remove-stray-semicolon.patch
+0008-fix-some-more-signedness-issues.patch



View it on GitLab: https://salsa.debian.org/med-team/spaced/compare/a06a4376dedf082728363932937136ced76a1f87...2cd54e1123894a6f82375a63be9996eb4182d964

-- 
View it on GitLab: https://salsa.debian.org/med-team/spaced/compare/a06a4376dedf082728363932937136ced76a1f87...2cd54e1123894a6f82375a63be9996eb4182d964
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180709/38c9b184/attachment-0001.html>


More information about the debian-med-commit mailing list