mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Remove unused fields from struct
The nvars, ndims, and natts fields on the NC_HDF5_FILE_INFO struct are never set. The nvars field is read, but since it is never written, the value is always zero.
This commit is contained in:
parent
473529d199
commit
cbb9448ab0
@ -308,9 +308,6 @@ typedef struct NC_HDF5_FILE_INFO
|
||||
#endif
|
||||
int flags;
|
||||
int cmode;
|
||||
int nvars;
|
||||
int ndims;
|
||||
int natts;
|
||||
nc_bool_t parallel; /* True if file is open for parallel access */
|
||||
nc_bool_t redef; /* True if redefining an existing file */
|
||||
int fill_mode; /* Fill mode for vars - Unused internally currently */
|
||||
|
@ -417,10 +417,6 @@ nc_def_var_nc4(int ncid, const char *name, nc_type xtype,
|
||||
if((unsigned long) ndims > X_INT_MAX) /* Backward compat */
|
||||
BAIL(NC_EINVAL);
|
||||
|
||||
/* Classic model files have a limit on number of vars. */
|
||||
if(h5->cmode & NC_CLASSIC_MODEL && h5->nvars >= NC_MAX_VARS)
|
||||
BAIL(NC_EMAXVARS);
|
||||
|
||||
/* Check that this name is not in use as a var, grp, or type. */
|
||||
if ((retval = nc4_check_dup_name(grp, norm_name)))
|
||||
BAIL(retval);
|
||||
|
Loading…
Reference in New Issue
Block a user