Skip to content

Commit

Permalink
Remove unused variable fid
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu committed Nov 18, 2024
1 parent 1089fa9 commit 42ed169
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/mat73.c
Original file line number Diff line number Diff line change
Expand Up @@ -2664,15 +2664,13 @@ int
Mat_VarRead73(mat_t *mat, matvar_t *matvar)
{
int err = MATIO_E_NO_ERROR;
hid_t fid, dset_id, ref_id;
hid_t dset_id, ref_id;

if ( NULL == mat || NULL == matvar )
return MATIO_E_BAD_ARGUMENT;
else if ( matvar->internal->id < 0 )
return MATIO_E_FAIL_TO_IDENTIFY;

fid = *(hid_t *)mat->fp;

switch ( matvar->class_type ) {
case MAT_C_DOUBLE:
case MAT_C_SINGLE:
Expand Down Expand Up @@ -2974,7 +2972,7 @@ Mat_VarReadData73(mat_t *mat, matvar_t *matvar, void *data, const int *start, co
const int *edge)
{
int err = MATIO_E_NO_ERROR, k;
hid_t fid, dset_id, ref_id, dset_space, mem_space;
hid_t dset_id, ref_id, dset_space, mem_space;
hsize_t *dset_start_stride_edge;
hsize_t *dset_start, *dset_stride, *dset_edge;

Expand All @@ -2984,8 +2982,6 @@ Mat_VarReadData73(mat_t *mat, matvar_t *matvar, void *data, const int *start, co
else if ( matvar->internal->id < 0 )
return MATIO_E_FAIL_TO_IDENTIFY;

fid = *(hid_t *)mat->fp;

dset_start_stride_edge = (hsize_t *)malloc(matvar->rank * 3 * sizeof(hsize_t));
if ( NULL == dset_start_stride_edge ) {
return MATIO_E_OUT_OF_MEMORY;
Expand Down Expand Up @@ -3061,16 +3057,14 @@ int
Mat_VarReadDataLinear73(mat_t *mat, matvar_t *matvar, void *data, int start, int stride, int edge)
{
int err = MATIO_E_NO_ERROR, k;
hid_t fid, dset_id, dset_space, mem_space;
hid_t dset_id, dset_space, mem_space;
hsize_t *points, dset_edge, *dimp;

if ( NULL == mat || NULL == matvar || NULL == data )
return MATIO_E_BAD_ARGUMENT;
else if ( matvar->internal->id < 0 )
return MATIO_E_FAIL_TO_IDENTIFY;

fid = *(hid_t *)mat->fp;

dset_edge = edge;
mem_space = H5Screate_simple(1, &dset_edge, NULL);

Expand Down

0 comments on commit 42ed169

Please sign in to comment.