Removed some dead assignments reported by clang.

This commit is contained in:
Ward Fisher 2016-06-20 15:28:46 -06:00
parent bb96050e66
commit 3e24dcd575
2 changed files with 12 additions and 7 deletions

View File

@ -382,13 +382,13 @@ ncx_szof(nc_type type)
return X_SIZEOF_FLOAT;
case NC_DOUBLE :
return X_SIZEOF_DOUBLE;
case NC_USHORT :
case NC_USHORT :
return X_SIZEOF_USHORT;
case NC_UINT :
case NC_UINT :
return X_SIZEOF_UINT;
case NC_INT64 :
case NC_INT64 :
return X_SIZEOF_INT64;
case NC_UINT64 :
case NC_UINT64 :
return X_SIZEOF_UINT64;
default:
assert("ncx_szof invalid type" == 0);
@ -446,15 +446,15 @@ NC_var_shape(NC_var *varp, const NC_dimarray *dims)
/*if(!(shp == varp->shape && IS_RECVAR(varp)))*/
if( shp != NULL && (shp != varp->shape || !IS_RECVAR(varp)))
{
if( (off_t)(*shp) <= OFF_T_MAX / product )
if( ((off_t)(*shp)) <= OFF_T_MAX / product )
{
product *= (*shp > 0 ? *shp : 1);
} else
{
product = OFF_T_MAX ;
product = OFF_T_MAX ;
}
}
*dsp = product;
*dsp = product;
}

View File

@ -4100,9 +4100,13 @@ NC4_walk(hid_t gid, int* countp)
/* walk group members of interest */
err = H5Gget_num_objs(gid, &nobj);
if(err < 0) return err;
for(i = 0; i < nobj; i++) {
/* Get name & kind of object in the group */
len = H5Gget_objname_by_idx(gid,(hsize_t)i,name,(size_t)NC_HDF5_MAX_NAME);
if(len < 0) return len;
otype = H5Gget_objtype_by_idx(gid,(size_t)i);
switch(otype) {
case H5G_GROUP:
@ -4121,6 +4125,7 @@ NC4_walk(hid_t gid, int* countp)
if(aid >= 0) {
const char** p;
ssize_t len = H5Aget_name(aid, NC_HDF5_MAX_NAME, name);
if(len < 0) return len;
/* Is this a netcdf-4 marker attribute */
for(p=NC_RESERVED_VARATT_LIST;*p;p++) {
if(strcmp(name,*p) == 0) {