Skip to content

Commit

Permalink
Merge pull request #76 from mauzey1/fix_warnings_in_interp_code
Browse files Browse the repository at this point in the history
Fix warnings in interp code
  • Loading branch information
efiring authored Nov 9, 2024
2 parents 007026a + fba2879 commit 8b141e5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions gsw_oceanographic_toolbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -8639,7 +8639,7 @@ gsw_sa_ct_interp(double *sa, double *ct, double *p, int m,
1.950903220161283e-1
};

int i, j, k, prof_len,
int i, k, prof_len,
not_monotonic, unique_count, new_len, p_all_len,
i_min_p_obs, i_obs_plus_interp_len, i_surf_and_obs_plus_interp_len,
i_out_len, i_2_len, i_frozen, i_shallower, i_above, i_above_i, i_below_i;
Expand Down Expand Up @@ -8908,9 +8908,9 @@ gsw_sa_ct_interp(double *sa, double *ct, double *p, int m,
break;
}

for (i=0; i < i_2_len; ++i) {
if ((i_3[i] - i_frozen) <= 0) {
i_shallower = i;
for (i_shallower=i_2_len-1; i_shallower>=0; --i_shallower) {
if ((i_3[i_shallower] - i_frozen) <= 0) {
break;
}
}
i_above = i_2[i_shallower];
Expand Down Expand Up @@ -11369,13 +11369,13 @@ gsw_tracer_ct_interp(double *tracer, double *ct, double *p, int m,
1.950903220161283e-1
};

int i, j, k, prof_len,
int i, k, prof_len,
not_monotonic, unique_count, new_len, p_all_len,
i_min_p_obs, i_obs_plus_interp_len, i_surf_and_obs_plus_interp_len,
i_out_len, i_2_len;
i_out_len;
int *p_idx, *p_all_idx, *i_obs_plus_interp, *i_surf_and_obs_plus_interp,
*i_out, *i_1, *i_2, *i_3;
double d, ct_f, unique_p, ct_sum, tracer_sum, min_p_obs, max_p_obs;
double d, unique_p, ct_sum, tracer_sum, min_p_obs, max_p_obs;
double *tracer_obs, *ct_obs, *p_obs, *p_i_tmp,
*p_sort, *tracer_sort, *ct_sort, *p_all, *p_all_sort,
*p_obs_plus_interp, *p_surf_and_obs_plus_interp,
Expand Down Expand Up @@ -11550,7 +11550,7 @@ gsw_tracer_ct_interp(double *tracer, double *ct, double *p, int m,
}
}
i_out_len = gsw_util_intersect(p_i_tmp, m_i, p_surf_and_obs_plus_interp, i_surf_and_obs_plus_interp_len, i_out, i_1);
i_2_len = gsw_util_intersect(p_obs, prof_len, p_obs_plus_interp, i_obs_plus_interp_len, i_2, i_3);
gsw_util_intersect(p_obs, prof_len, p_obs_plus_interp, i_obs_plus_interp_len, i_2, i_3);

independent_variable = (double *) malloc(prof_len*sizeof (double));
independent_variable_obs_plus_interp = (double *) malloc(i_obs_plus_interp_len*sizeof (double));
Expand Down

0 comments on commit 8b141e5

Please sign in to comment.