mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-07 17:08:02 +08:00
Merge pull request #1851 from brtnfld/master
Replaced deprecated (in 1.8.0) H5Aopen_name with H5Aopen_by_name
This commit is contained in:
commit
e4138efa9d
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user