diff --git a/examples/C/pres_temp_4D_rd.c b/examples/C/pres_temp_4D_rd.c index 6cdfce738..d6d44814c 100644 --- a/examples/C/pres_temp_4D_rd.c +++ b/examples/C/pres_temp_4D_rd.c @@ -79,7 +79,7 @@ main() float lats[NLAT], lons[NLON]; /* Loop indexes. */ - int lvl, lat, lon, rec, i = 0; + int lvl, lat, lon, i = 0; /* Error handling. */ int retval; @@ -128,7 +128,7 @@ main() start[3] = 0; /* Read and check one record at a time. */ - for (rec = 0; rec < NREC; rec++) + for (size_t rec = 0; rec < NREC; rec++) { start[0] = rec; if ((retval = nc_get_vara_float(ncid, pres_varid, start, diff --git a/examples/C/pres_temp_4D_wr.c b/examples/C/pres_temp_4D_wr.c index 3820b1627..5b5452f13 100644 --- a/examples/C/pres_temp_4D_wr.c +++ b/examples/C/pres_temp_4D_wr.c @@ -78,7 +78,7 @@ main() float lats[NLAT], lons[NLON]; /* Loop indexes. */ - int lvl, lat, lon, rec, i = 0; + int lvl, lat, lon, i = 0; /* Error handling. */ int retval; @@ -188,7 +188,7 @@ main() surface temperature data. The arrays only hold one timestep worth of data. We will just rewrite the same data for each timestep. In a real application, the data would change between timesteps. */ - for (rec = 0; rec < NREC; rec++) + for (size_t rec = 0; rec < NREC; rec++) { start[0] = rec; if ((retval = nc_put_vara_float(ncid, pres_varid, start, count,