Hi, attached the patch updated for gcc-6 (addition of the incomplete upstream
one)
and the complete debdiff for a building oding against gcc-6
basically the new issues (excluding the already upstream-patched
"odinseq/odinpulse.cpp"
were:
in odinseq/seqgradspiral.cpp
bad compare between double and float
- max_grad_diff=STD_max(double(max_grad_diff),fabs(tds.Gx-last_Gx));
- max_grad_diff=STD_max(double(max_grad_diff),fabs(tds.Gy-last_Gy));
+ max_grad_diff=STD_max(max_grad_diff,fabs(tds.Gx-last_Gx));
+ max_grad_diff=STD_max(max_grad_diff,fabs(tds.Gy-last_Gy));
- max_grad_magn=STD_max(double(max_grad_magn),fabs(tds.Gx));
-max_grad_magn=STD_max(double(max_grad_magn),fabs(tds.Gy));
+max_grad_magn=STD_max(max_grad_magn,fabs(tds.Gx));
+max_grad_magn=STD_max(max_grad_magn,fabs(tds.Gy));
and in cmdline-utils/swab.cpp
ifstream return check
- if(in_data == NULL) {
+ if(in_data.fail()) {
- if(out_data == NULL) {
+ if(out_data.fail()) {
- if(out_data == NULL) {
+ if(out_data.fail()) {
they seem to be correct to me, but I'm ccing upstream to be sure :)
BTW, in deferred/5.
thanks,
G.
debdiff-v2
Description: Binary data
Description: Fix some std::max(double,float) call mismatch and some "ifstream not comparable with NULL"
Author: Gianfranco Costamagna
--- odin-2.0.2.orig/odinseq/seqgradspiral.cpp
+++ odin-2.0.2/odinseq/seqgradspiral.cpp
@@ -27,12 +27,12 @@ float SeqGradSpiral::readout_npts() cons
const kspace_coord& tds=traj_cache->calculate(s);
if(i) {
deltaKtangential=STD_max(double(deltaKtangential),norm(tds.kx-last_kx,tds.ky-last_ky));
- max_grad_diff=STD_max(double(max_grad_diff),fabs(tds.Gx-last_Gx));
- max_grad_diff=STD_max(double(max_grad_diff),fabs(tds.Gy-last_Gy));
+ max_grad_diff=STD_max(max_grad_diff,fabs(tds.Gx-last_Gx));
+ max_grad_diff=STD_max(max_grad_diff,fabs(tds.Gy-last_Gy));
}
-max_grad_magn=STD_max(double(max_grad_magn),fabs(tds.Gx));
-max_grad_magn=STD_max(double(max_grad_magn),fabs(tds.Gy));
+max_grad_magn=STD_max(max_grad_magn,fabs(tds.Gx));
+max_grad_magn=STD_max(max_grad_magn,fabs(tds.Gy));
last_kx=tds.kx;
last_ky=tds.ky;
--- odin-2.0.2.orig/cmdline-utils/swab.cpp
+++ odin-2.0.2/cmdline-utils/swab.cpp
@@ -28,7 +28,7 @@ int main(int argc, char* argv[]) {
}
std::ifstream in_data(argv[2],std::ios::in|std::ios::binary);
- if(in_data == NULL) {
+ if(in_data.fail()) {
std::cerr << "swab: ERROR: can't open file " << argv[2] << std::endl;
return -1;
}
@@ -56,14 +56,14 @@ int main(int argc, char* argv[]) {
for(k=0;k