Merge pull request #1851 from brtnfld/master

Replaced deprecated (in 1.8.0) H5Aopen_name with H5Aopen_by_name
This commit is contained in:
Ward Fisher 2020-10-01 14:25:06 -07:00 committed by GitHub
commit e4138efa9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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)
@ -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)

View File

@ -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);