diff --git a/src/cases/var_rd_G_case.cpp b/src/cases/var_rd_G_case.cpp index 136305c4..644bc4a5 100644 --- a/src/cases/var_rd_G_case.cpp +++ b/src/cases/var_rd_G_case.cpp @@ -180,9 +180,9 @@ int e3sm_io_case::run_varn_G_case_rd (e3sm_io_config &cfg, double **D6_rec_dbl_bufp, /* D6 rec double buffer */ double **D1_fix_dbl_bufp) /* D1 fix double buffer */ { - int ii, i, j, k, err, rank, ncid, *varids; + int i, j, k, err, rank, ncid, *varids; int nrecs=0, rec_no, my_nreqs; - size_t rec_buflen, nelems[6]; + size_t ii, rec_buflen, nelems[6]; double *D1_rec_dbl_buf, *D3_rec_dbl_buf, *D4_rec_dbl_buf, *D5_rec_dbl_buf, *D6_rec_dbl_buf, *rec_buf_ptr; int *D1_fix_int_buf, *D2_fix_int_buf, *D3_fix_int_buf, *D4_fix_int_buf, *D5_fix_int_buf; @@ -315,7 +315,7 @@ int e3sm_io_case::run_varn_G_case_rd (e3sm_io_config &cfg, /* int (nCells): maxLevelCell */ if (nelems[0] > 0) { D1_fix_int_buf = (int *)malloc (nelems[0] * sizeof (int)); - for (ii=0; ii 0) { D2_fix_int_buf = (int *)malloc (2 * nelems[1] * sizeof (int)); - for (ii= 0; ii<2*nelems[1]; ii++) D2_fix_int_buf[ii] = rank + ii; + for (ii= 0; ii<2*nelems[1]; ii++) D2_fix_int_buf[ii] = rank + (int)ii; *D2_fix_int_bufp = D2_fix_int_buf; } else D2_fix_int_buf = NULL; @@ -331,7 +331,7 @@ int e3sm_io_case::run_varn_G_case_rd (e3sm_io_config &cfg, /* int (nCells, nVertLevels): cellMask */ if (nelems[2] > 0) { D3_fix_int_buf = (int *)malloc (nelems[2] * sizeof (int)); - for (ii=0; ii 0) { D4_fix_int_buf = (int *)malloc (nelems[3] * sizeof (int)); - for (ii=0; ii 0) { D5_fix_int_buf = (int *)malloc (nelems[4] * sizeof (int)); - for (ii=0; ii 0) { D1_fix_dbl_buf = (double *)malloc (nelems[0] * sizeof (double)); - for (ii=0; ii 0) { rec_buflen = nelems[0] * nD1_rec_2d_vars; D1_rec_dbl_buf = (double *)malloc (rec_buflen * sizeof (double)); - for (ii=0; ii 0) { rec_buflen = nelems[2] * nD3_rec_3d_vars; D3_rec_dbl_buf = (double *)malloc (rec_buflen * sizeof (double)); - for (ii=0; ii 0) { rec_buflen = nelems[3] * nD4_rec_3d_vars; D4_rec_dbl_buf = (double *)malloc (rec_buflen * sizeof (double)); - for (ii=0; ii 0) { rec_buflen = nelems[4] * nD5_rec_3d_vars; D5_rec_dbl_buf = (double *)malloc (rec_buflen * sizeof (double)); - for (ii=0; ii 0) { rec_buflen = nelems[5] * nD6_rec_3d_vars; D6_rec_dbl_buf = (double *)malloc (rec_buflen * sizeof (double)); - for (ii=0; ii