Skip to content

Commit

Permalink
Fix -Wmaybe-uninitialized warnings (#2653)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason authored Nov 16, 2022
1 parent b1f07f2 commit df43b79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions raster/r.sim/simlib/hydro.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ void main_loop(void)
}
nwalka = 0;
nstack = 0;
decr = 0.0;
velx = 0.0;
vely = 0.0;
eff = 0.0;

#pragma omp parallel firstprivate(l,lw,k,decr,d1,hhc,velx,vely,eff,gaux,gauy) //nwalka
{
Expand Down
8 changes: 4 additions & 4 deletions raster/r.sun/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1690,15 +1690,15 @@ void calculate(double singleSlope, double singleAspect, double singleAlbedo,
int someRadiation;
int numRows;
int arrayOffset;
double lum, q1;
double lum = 0.0, q1 = 0.0;
double dayRad;
double latid_l, cos_u, cos_v, sin_u, sin_v;
double sin_phi_l, tan_lam_l;
double latid_l = 0.0, cos_u = 0.0, cos_v = 0.0, sin_u = 0.0, sin_v = 0.0;
double sin_phi_l = 0.0, tan_lam_l = 0.0;
double zmax = 0;
double longitTime = 0.;
double locTimeOffset;
double latitude, longitude;
double coslat;
double coslat = 0.0;


struct SunGeometryConstDay sunGeom;
Expand Down

0 comments on commit df43b79

Please sign in to comment.