Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed memory problem in tst_h_dimscales #511

Merged
merged 2 commits into from
Oct 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this change to eliminate warning. H5Gget_num_objs does not expect a volatile.

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