Commit 537eaff5 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane

remove many warnings

parent 39432dca
...@@ -4,7 +4,7 @@ use class * ...@@ -4,7 +4,7 @@ use class *
#compiler options #compiler options
#default is gcc here are the C++ compiler options #default is gcc here are the C++ compiler options
macro cppflags " -O2 -pipe -fPIC -Wall " macro cppflags " -O2 -pipe -fPIC -Wall -Wno-reorder -Wno-sign-compare -Wno-unknown-pragmas"
#do we need optimzations here? #do we need optimzations here?
#macro_append cppflags "-ffast-math -m64 " #macro_append cppflags "-ffast-math -m64 "
......
...@@ -75,7 +75,8 @@ OofNoise::OofNoise(AbsGauss* r,double slope,double fmin,double fknee,double fsam ...@@ -75,7 +75,8 @@ OofNoise::OofNoise(AbsGauss* r,double slope,double fmin,double fknee,double fsam
OofNoise::~OofNoise(){ OofNoise::~OofNoise(){
for (unsigned i=0;i<ff.size();i++) delete ff[i]; for (unsigned i=0;i<ff.size();i++) delete ff[i];
if (_r) delete _r; _r=NULL; if (_r) delete _r;
_r=NULL;
} }
double double
......
...@@ -86,7 +86,7 @@ void Lollipop::CreateDataSet( string DataFile) ...@@ -86,7 +86,7 @@ void Lollipop::CreateDataSet( string DataFile)
fp.close(); fp.close();
if( (long)dataset.size() != Lmax-Lmin+1) { if( (long)dataset.size() != Lmax-Lmin+1) {
printf( "Wrong number of l in datafile (%d)\n", (long)dataset.size()); printf( "Wrong number of l in datafile (%ld)\n", (long)dataset.size());
exit(-1); exit(-1);
} }
......
...@@ -27,6 +27,7 @@ class ClassAdapter ...@@ -27,6 +27,7 @@ class ClassAdapter
{ {
public: public:
virtual std::string className() {return name;}; virtual std::string className() {return name;};
virtual ~ClassAdapter(){};
virtual std::string toClass(const std::vector<double>& par) const=0; virtual std::string toClass(const std::vector<double>& par) const=0;
protected: protected:
......
...@@ -94,7 +94,7 @@ ClassEngine::ClassEngine(const ClassParams& pars): cl(0),dofree(true),pvecback(0 ...@@ -94,7 +94,7 @@ ClassEngine::ClassEngine(const ClassParams& pars): cl(0),dofree(true),pvecback(0
//prepare fp structure //prepare fp structure
size_t n=pars.size(); size_t n=pars.size();
// //
parser_init(&fc,n,"pipo",_errmsg); parser_init(&fc,n,const_cast<char*>("pipo"),_errmsg);
//config //config
for (size_t i=0;i<pars.size();i++){ for (size_t i=0;i<pars.size();i++){
...@@ -151,7 +151,7 @@ ClassEngine::ClassEngine(const ClassParams& pars,const string & precision_file): ...@@ -151,7 +151,7 @@ ClassEngine::ClassEngine(const ClassParams& pars,const string & precision_file):
fc_input.filename=new char[1]; fc_input.filename=new char[1];
//prepare fc par structure //prepare fc par structure
size_t n=pars.size(); size_t n=pars.size();
parser_init(&fc_input,n,"pipo",_errmsg); parser_init(&fc_input,n,const_cast<char*>("pipo"),_errmsg);
//config //config
for (size_t i=0;i<pars.size();i++){ for (size_t i=0;i<pars.size();i++){
strcpy(fc_input.name[i],pars.key(i).c_str()); strcpy(fc_input.name[i],pars.key(i).c_str());
...@@ -568,9 +568,9 @@ double ClassEngine::get_Pklin(double k, double z){ ...@@ -568,9 +568,9 @@ double ClassEngine::get_Pklin(double k, double z){
#ifdef CLASSV_ABOVE_2_7 #ifdef CLASSV_ABOVE_2_7
double pk_cb=0.; double pk_cb=0.;
double pk_cb_ic=0.; double pk_cb_ic=0.;
int ret=spectra_pk_at_k_and_z(&ba,&pm,&sp,k,z,&mypk,pk_ic,&pk_cb,&pk_cb_ic); assert(spectra_pk_at_k_and_z(&ba,&pm,&sp,k,z,&mypk,pk_ic,&pk_cb,&pk_cb_ic)==_SUCCESS_);
#else #else
int ret=spectra_pk_at_k_and_z(&ba,&pm,&sp,k,z,&mypk,pk_ic); assert(spectra_pk_at_k_and_z(&ba,&pm,&sp,k,z,&mypk,pk_ic)==_SUCCESS_);
#endif #endif
return mypk; return mypk;
...@@ -587,9 +587,9 @@ double ClassEngine::get_PkNL(double k, double z){ ...@@ -587,9 +587,9 @@ double ClassEngine::get_PkNL(double k, double z){
#ifdef CLASSV_ABOVE_2_7 #ifdef CLASSV_ABOVE_2_7
double pk_cb_tot=0; double pk_cb_tot=0;
int ret = spectra_pk_nl_at_k_and_z(&ba,&pm,&sp,k,z,&mypk,&pk_cb_tot); assert(spectra_pk_nl_at_k_and_z(&ba,&pm,&sp,k,z,&mypk,&pk_cb_tot)==_SUCCESS_);
#else #else
int ret = spectra_pk_nl_at_k_and_z(&ba,&pm,&sp,k,z,&mypk); assert(spectra_pk_nl_at_k_and_z(&ba,&pm,&sp,k,z,&mypk)==_SUCCESS_);
#endif #endif
return mypk; return mypk;
} }
...@@ -727,17 +727,9 @@ double ClassEngine::get_Da(double z) ...@@ -727,17 +727,9 @@ double ClassEngine::get_Da(double z)
int index; int index;
//transform redshift in conformal time //transform redshift in conformal time
background_tau_of_z(&ba,z,&tau); background_tau_of_z(&ba,z,&tau);
//call to fill pvecback //call to fill pvecback
background_at_tau(&ba,tau,ba.long_info,ba.inter_normal, &index, pvecback); background_at_tau(&ba,tau,ba.long_info,ba.inter_normal, &index, pvecback);
double H_z=pvecback[ba.index_bg_H];
double D_ang=pvecback[ba.index_bg_ang_distance]; double D_ang=pvecback[ba.index_bg_ang_distance];
#ifdef DBUG
cout << "H_z= "<< H_z <<endl;
cout << "D_ang= "<< D_ang <<endl;
#endif
return D_ang; return D_ang;
} }
......
...@@ -22,7 +22,7 @@ class LensingLikelihood ...@@ -22,7 +22,7 @@ class LensingLikelihood
{ {
public: public:
virtual ~LensingLikelihood(){};
virtual int lmax() const =0; virtual int lmax() const =0;
//convention: return -log(L) //convention: return -log(L)
virtual double computePPLikelihood(const std::vector<unsigned int>& l, virtual double computePPLikelihood(const std::vector<unsigned int>& l,
......
...@@ -86,7 +86,7 @@ int main(int argc, char *argv[]) ...@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
//SP 25/06/19: compute scale if undefined depending on dim //SP 25/06/19: compute scale if undefined depending on dim
if (scale<0) { if (scale<0) {
scale=2.38*2.38/dim; scale=2.38*2.38/dim;
cout << "refining scale to " << scale << endl; cout << "defining scale factor as " << scale << endl;
} }
//--------defining seeds----------------------------------------------- //--------defining seeds-----------------------------------------------
unsigned int seed(0); unsigned int seed(0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment