Skip to content

Commit

Permalink
Merge pull request Unidata#1851 from brtnfld/master
Browse files Browse the repository at this point in the history
Replaced deprecated (in 1.8.0) H5Aopen_name with H5Aopen_by_name
  • Loading branch information
WardF authored Oct 1, 2020
2 parents 2b3af8e + 2620c01 commit e4138ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions libhdf5/hdf5open.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ read_coord_dimids(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var)
/* There is a hidden attribute telling us the ids of the
* dimensions that apply to this multi-dimensional coordinate
* variable. Read it. */
if ((coord_attid = H5Aopen_name(hdf5_var->hdf_datasetid, COORDINATES)) < 0)
if ((coord_attid = H5Aopen_by_name(hdf5_var->hdf_datasetid, ".", COORDINATES,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
BAIL(NC_EATTMETA);

if ((coord_att_typeid = H5Aget_type(coord_attid)) < 0)
Expand Down Expand Up @@ -2317,7 +2318,8 @@ read_scale(NC_GRP_INFO_T *grp, hid_t datasetid, const char *obj_name,
BAIL(NC_EHDFERR);
if (attr_exists)
{
if ((attid = H5Aopen_name(datasetid, NC_DIMID_ATT_NAME)) < 0)
if ((attid = H5Aopen_by_name(datasetid,".", NC_DIMID_ATT_NAME,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
BAIL(NC_EHDFERR);

if (H5Aread(attid, H5T_NATIVE_INT, &assigned_id) < 0)
Expand Down
2 changes: 1 addition & 1 deletion libhdf5/nc4info.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ NC4_read_ncproperties(NC_FILE_INFO_T* h5, char** propstring)
}

/* NCPROPS Attribute exists, make sure it is legitimate */
attid = H5Aopen_name(hdf5grpid, NCPROPS);
attid = H5Aopen_by_name(hdf5grpid, ".", NCPROPS, H5P_DEFAULT, H5P_DEFAULT);
assert(attid > 0);
aspace = H5Aget_space(attid);
atype = H5Aget_type(attid);
Expand Down

0 comments on commit e4138ef

Please sign in to comment.