[med-svn] [ray] 01/02: fix FTBFS with GCC6

Sascha Steinbiss sascha at steinbiss.name
Fri Apr 8 16:04:29 UTC 2016


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

sascha-guest pushed a commit to branch master
in repository ray.

commit 6b7d421d6d1f1cdd48193645dc952ec528f283e3
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Fri Apr 8 15:57:41 2016 +0000

    fix FTBFS with GCC6
---
 debian/patches/gcc-6.patch | 47 ++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series      |  1 +
 2 files changed, 48 insertions(+)

diff --git a/debian/patches/gcc-6.patch b/debian/patches/gcc-6.patch
new file mode 100644
index 0000000..39a31f1
--- /dev/null
+++ b/debian/patches/gcc-6.patch
@@ -0,0 +1,47 @@
+Description: allow compilation in GCC6
+ GCC6 seems to handle implicit casts from iostream to bool differently.
+ This patch adds explicit checks for !stream.fail() instead of relying on
+ implicit conversion to do The Right Thing.
+Author: Sascha Steinbiss <sascha at steinbiss.name>
+--- a/code/GeneOntology/GeneOntology.cpp
++++ b/code/GeneOntology/GeneOntology.cpp
+@@ -218,7 +218,7 @@
+ 		cout<<m_annotationFileName<<endl;
+ 
+ 		ifstream test1(m_ontologyFileName.c_str());
+-		bool test1Result=test1;
++		bool test1Result=!(test1.fail());
+ 		test1.close();
+ 
+ 		if(!test1Result){
+@@ -227,7 +227,7 @@
+ 		}
+ 
+ 		ifstream test2(m_annotationFileName.c_str());
+-		bool test2Result=test2;
++		bool test2Result=!(test2.fail());
+ 		test2.close();
+ 
+ 		if(!test2Result){
+--- a/code/Mock/Parameters.cpp
++++ b/code/Mock/Parameters.cpp
+@@ -1069,7 +1069,7 @@
+ 	bool hasCommandFile=false;
+ 	if(argc==2){
+ 		ifstream f(argv[1]);
+-		hasCommandFile=f;
++		hasCommandFile=!(f.fail());
+ 		f.close();
+ 	}
+ 
+--- a/code/SequencesLoader/Loader.cpp
++++ b/code/SequencesLoader/Loader.cpp
+@@ -47,7 +47,7 @@
+ 
+ int Loader::load(string file,bool isGenome){
+ 	ifstream f(file.c_str());
+-	bool exists=f;
++	bool exists=!(f.fail());
+ 	f.close();
+ 	if(!exists){
+ 		cout<<"Ray: cannot access '"<<file<<"': No such file or directory"<<endl;
diff --git a/debian/patches/series b/debian/patches/series
index 2984422..40c3d14 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 hardening.patch
 mips.patch
+gcc-6.patch

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



More information about the debian-med-commit mailing list