fix: fix bad C instructions for modern compiler

This commit is contained in:
Guilhem Lavaux 2025-07-02 14:01:53 +02:00
parent b68bc67451
commit 328cd77336
4 changed files with 5 additions and 6 deletions

View file

@ -78,7 +78,7 @@ double halo_concentration(double m)
double cvir_model(double mass)
{
double cvir,z_coll,zbrent(),rad;
double cvir,z_coll,rad;
double k=3.12;
double f=0.001;

View file

@ -542,7 +542,7 @@ double func_central_density(double m)
*/
double number_weighted_halo_mass()
{
double funcxx1();
double funcxx1(double);
return(qromo(funcxx1,log(HOD.M_low),log(HOD.M_max),midpnt)/GALAXY_DENSITY);
}
double funcxx1(double m)
@ -556,7 +556,7 @@ double funcxx1(double m)
*/
double number_weighted_central_mass()
{
double funcxx2();
double funcxx2(double);
return(qromo(funcxx2,log(HOD.M_low),log(HOD.M_max),midpnt)/
qromo(func_central_density,log(HOD.M_low),log(HOD.M_max),midpnt));
}

View file

@ -32,7 +32,7 @@ double xi_interp(double r)
static int flag=0,prev_cosmo=0;
static double *x,*y,*y2;
int n=30,i,j;
double a,xi_int(),rhi=95,rlo=0.1,dlogr,klo,s1,s2,tolerance=1.0e-6;
double a,rhi=95,rlo=0.1,dlogr,klo,s1,s2,tolerance=1.0e-6;
if(!flag || RESET_COSMOLOGY!=prev_cosmo)
{
@ -99,7 +99,7 @@ double xi_linear_interp(double r)
static double *x,*y,*y2;
int n=100,i;
double a,rlo=0.1,rhi=150,dlogr,klo;
double xi_linear_int();
double xi_linear_int(double);
if(!flag || RESET_COSMOLOGY!=prev_cosmo)
{

View file

@ -8,7 +8,6 @@ double zbrent(double (*func)(double), double x1,double x2, double tol)
int iter;
double a=x1,b=x2,c,d,e,min1,min2;
double fa=(*func)(a),fb=(*func)(b),fc,p,q,r,s,tol1,xm;
void nrerror();
if (fb*fa > 0.0)
{