mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Fix warnings in examples
This commit is contained in:
parent
3e70c8133f
commit
662afedb90
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user