remove unneeded params from function

This commit is contained in:
Ed Hartnett 2018-11-16 08:26:09 -07:00
parent 0289029508
commit 8ae5ebf6bc
5 changed files with 32 additions and 44 deletions

View File

@ -89,21 +89,36 @@ typedef struct NC_HDF5_FIELD_INFO
hid_t native_hdf_typeid;
} NC_HDF5_FIELD_INFO_T;
/* These functions do HDF5 things. */
/* Logging and debugging. */
void reportopenobjects(int log, hid_t);
int hdf5_set_log_level();
/* These functions deal with HDF5 dimension scales. */
int rec_detach_scales(NC_GRP_INFO_T *grp, int dimid, hid_t dimscaleid);
int rec_reattach_scales(NC_GRP_INFO_T *grp, int dimid, hid_t dimscaleid);
int delete_existing_dimscale_dataset(NC_GRP_INFO_T *grp, int dimid, NC_DIM_INFO_T *dim);
void reportopenobjects(int log, hid_t);
int nc4_rec_grp_HDF5_del(NC_GRP_INFO_T *grp);
int nc4_open_var_grp2(NC_GRP_INFO_T *grp, int varid, hid_t *dataset);
int nc4_rec_match_dimscales(NC_GRP_INFO_T *grp);
/* Write metadata. */
int nc4_rec_write_metadata(NC_GRP_INFO_T *grp, nc_bool_t bad_coord_order);
int nc4_rec_write_groups_types(NC_GRP_INFO_T *grp);
int nc4_enddef_netcdf4_file(NC_FILE_INFO_T *h5);
/* Adjust the cache. */
int nc4_adjust_var_cache(NC_GRP_INFO_T *grp, NC_VAR_INFO_T * var);
/* Open a HDF5 dataset. */
int nc4_open_var_grp2(NC_GRP_INFO_T *grp, int varid, hid_t *dataset);
/* Find types. */
NC_TYPE_INFO_T *nc4_rec_find_hdf_type(NC_FILE_INFO_T* h5,
hid_t target_hdf_typeid);
int nc4_get_hdf_typeid(NC_FILE_INFO_T *h5, nc_type xtype,
hid_t *hdf_typeid, int endianness);
/* Enddef and closing files. */
int nc4_close_hdf5_file(NC_FILE_INFO_T *h5, int abort, NC_memio *memio);
int nc4_rec_grp_HDF5_del(NC_GRP_INFO_T *grp);
int nc4_enddef_netcdf4_file(NC_FILE_INFO_T *h5);
/* Break & reform coordinate variables */
int nc4_break_coord_var(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *coord_var, NC_DIM_INFO_T *dim);
@ -115,7 +130,6 @@ extern void NC4_image_finalize(void*);
/* These functions are internal to the libhdf5 directory. */
int nc4_detect_preserve_dimids(NC_GRP_INFO_T *grp, nc_bool_t *bad_coord_orderp);
int hdf5_set_log_level();
int nc4_get_fill_value(NC_FILE_INFO_T *h5, NC_VAR_INFO_T *var, void **fillp);
#endif /* _HDF5INTERNAL_ */

View File

@ -192,35 +192,17 @@ typedef struct NC_ENUM_MEMBER_INFO
typedef struct NC_TYPE_INFO
{
NC_OBJ hdr; /* contains netCDF type ID, equivalent to a pre-defined type
* for atomic types, but a dynamically
* defined value for user-defined types (stored
* as named datatypes in the HDF5 file).
*/
struct NC_GRP_INFO* container; /* Containing group */
NC_OBJ hdr; /* NetCDF type ID. */
struct NC_GRP_INFO *container; /* Containing group */
unsigned rc; /* Ref. count of objects using this type */
hid_t hdf_typeid; /* HDF5 type ID, in the file */
hid_t native_hdf_typeid; /* HDF5 type ID, in memory */
int endianness; /* What endianness for the type? */
/* (Set for integer types as well as "complex"
* types, like compound/enum/vlen, used for the
* endianness of the fields and/or base type)
*/
size_t size; /* Size of the type in memory, in bytes */
nc_bool_t committed; /* True when datatype is committed in the file */
nc_type nc_type_class; /* NC_VLEN, NC_COMPOUND, NC_OPAQUE, or NC_ENUM
* NOTE: NC_INT is used for all integer types,
* NC_FLOAT is used for all floating-point
* types, and NC_STRING is also used for
* fixed- and variable-length strings.
* (NC_CHAR is used for characters though)
*
* This is somewhat redundant with the
* nc_type field, but allows the code to
* have a single location to look at for
* the "kind" of a type.
*/
nc_type nc_type_class; /* NC_VLEN, NC_COMPOUND, NC_OPAQUE,
* NC_ENUM, NC_INT, NC_FLOAT, or
* NC_STRING. */
/* Information for each type or class */
union {
@ -316,7 +298,6 @@ int nc4_convert_type(const void *src, void *dest, const nc_type src_type,
const void *fill_value, int strict_nc3);
/* These functions do HDF5 things. */
/* int nc4_rec_detect_need_to_preserve_dimids(NC_GRP_INFO_T *grp, nc_bool_t *bad_coord_orderp); */
int nc4_reopen_dataset(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var);
int nc4_read_atts(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var);
@ -339,8 +320,6 @@ int nc4_find_grp_h5_var(int ncid, int varid, NC_FILE_INFO_T **h5,
NC_GRP_INFO_T **grp, NC_VAR_INFO_T **var);
int nc4_find_grp_att(NC_GRP_INFO_T *grp, int varid, const char *name,
int attnum, NC_ATT_INFO_T **att);
int nc4_get_hdf_typeid(NC_FILE_INFO_T *h5, nc_type xtype,
hid_t *hdf_typeid, int endianness);
int nc4_get_typeclass(const NC_FILE_INFO_T *h5, nc_type xtype,
int *type_class);
@ -361,8 +340,8 @@ int nc4_type_list_add(NC_GRP_INFO_T *grp, size_t size, const char *name, NC_TYPE
int nc4_type_list_del(NC_GRP_INFO_T* grp, NC_TYPE_INFO_T *type);
int nc4_type_free(NC_TYPE_INFO_T *type);
int nc4_field_list_add(NC_TYPE_INFO_T* parent, const char *name,
size_t offset, hid_t field_hdf_typeid, hid_t native_typeid,
nc_type xtype, int ndims, const int *dim_sizesp);
size_t offset, nc_type xtype, int ndims,
const int *dim_sizesp);
int nc4_att_list_add(NCindex* list, const char* name, NC_ATT_INFO_T **att);
int nc4_att_list_del(NCindex* list, NC_ATT_INFO_T *att);
int nc4_grp_list_add(NC_FILE_INFO_T *h5, NC_GRP_INFO_T *parent, char *name, NC_GRP_INFO_T **grp);

View File

@ -1403,9 +1403,7 @@ read_type(NC_GRP_INFO_T *grp, hid_t hdf_typeid, char *type_name)
break;
/* Add this member to our list of fields in this compound type. */
if ((retval = nc4_field_list_add(type, member_name,
member_offset, H5Tget_super(member_hdf_typeid),
H5Tget_super(member_native_typeid),
if ((retval = nc4_field_list_add(type, member_name, member_offset,
member_xtype, ndims, dim_size)))
break;
}
@ -1417,8 +1415,7 @@ read_type(NC_GRP_INFO_T *grp, hid_t hdf_typeid, char *type_name)
break;
/* Add this member to our list of fields in this compound type. */
if ((retval = nc4_field_list_add(type, member_name,
member_offset, member_hdf_typeid, member_native_typeid,
if ((retval = nc4_field_list_add(type, member_name, member_offset,
member_xtype, 0, NULL)))
break;
}

View File

@ -352,7 +352,7 @@ NC4_insert_array_compound(int ncid, int typeid1, const char *name,
return NC_ETYPDEFINED;
/* Insert new field into this type's list of fields. */
if ((retval = nc4_field_list_add(type, norm_name, offset, 0, 0, field_typeid,
if ((retval = nc4_field_list_add(type, norm_name, offset, field_typeid,
ndims, dim_sizesp)))
return retval;

View File

@ -910,8 +910,6 @@ nc4_type_list_add(NC_GRP_INFO_T *grp, size_t size, const char *name,
* @param parent parent type
* @param name Name of the field.
* @param offset Offset in bytes.
* @param field_hdf_typeid The HDF5 type ID of the field.
* @param native_typeid The HDF5 native type ID of the field.
* @param xtype The netCDF type of the field.
* @param ndims The number of dimensions of the field.
* @param dim_sizesp An array of dim sizes for the field.
@ -921,8 +919,8 @@ nc4_type_list_add(NC_GRP_INFO_T *grp, size_t size, const char *name,
*/
int
nc4_field_list_add(NC_TYPE_INFO_T *parent, const char *name,
size_t offset, hid_t field_hdf_typeid, hid_t native_typeid,
nc_type xtype, int ndims, const int *dim_sizesp)
size_t offset, nc_type xtype, int ndims,
const int *dim_sizesp)
{
NC_FIELD_INFO_T *field;