Skip to content

Commit

Permalink
fixed memory problem in tst_h_dimscales
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Oct 23, 2017
1 parent a2964f5 commit 6a71bf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions h5_test/tst_h_dimscales.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ rec_scan_group(hid_t grpid)
}
else
{
int visitor_data = 0;
hid_t visitor_data = 0;

/* Here's how to get the number of scales attached
* to the dataset's dimension 0. */
Expand Down Expand Up @@ -379,7 +379,7 @@ main()
if ((grpid = H5Gopen(fileid, GRP_NAME)) < 0) ERR;

/* Loop through datasets to find variables. */
if (H5Gget_num_objs(grpid, &num_obj) < 0) ERR;
if (H5Gget_num_objs(grpid, (hsize_t *)&num_obj) < 0) ERR;
for (i=0; i<num_obj; i++)
{
/* Get the type (i.e. group, dataset, etc.), and the name of
Expand Down Expand Up @@ -426,7 +426,7 @@ main()
else
{
char label[STR_LEN+1];
int visitor_data = 0;
hid_t visitor_data = 0;

/* Here's how to get the number of scales attached
* to the dataset's dimension 0. */
Expand Down Expand Up @@ -617,7 +617,7 @@ main()
else
{
char label[STR_LEN+1];
int visitor_data = 0;
hid_t visitor_data = 0;

/* SHould have these dimensions... */
if (dims[TIME_DIM] != 0 || dims[LAT_DIM] != LAT_LEN ||
Expand Down

0 comments on commit 6a71bf8

Please sign in to comment.