warning: control may reach end of non-void function [-Wreturn-type]
rafuck opened this issue · comments
in function
inline double rho_pX(double p, double X, IF97parameters inkey)
missed return
before
RegionOutput(IF97_DMASS, T, p, NONE);
at the end of function
Wow. I can't believe this even compiled. I didn't implement it in the Mathcad wrapper and CoolProp doesn't call this function, so I don't think it was ever tested. I assume you are getting a run-time error from your own code. I'll patch it up today.
%)
No, it was not runtime error. I started with the -Wall -Wextra
and fix all warnings. Added const
modifier to all methods (don't ask, why :). Then replaced pow(something, 0.5)
with sqrt
, and also some optimizations in functions, which I will use in my job.
There's something else wrong with this function as well. It returns Pressure out of range for values of (P,H) that should work. Looking into it.
Yes, of course. But now I still testing. I will use Region5::T_p(double p)
and try vectorize calculations in this method. And also rhomass
.
Also some strange lines in this function:
double vliq = 1.0/R1.output(IF97_DMASS,Tsat,p);
double vvap = 1.0/R1.output(IF97_DMASS,Tsat,p);
It seems that one of them must be 1.0/R2.output