From 42ed169de17d2ac959e8d319a45b57feb5d04a4a Mon Sep 17 00:00:00 2001 From: tbeu Date: Mon, 18 Nov 2024 19:46:15 +0100 Subject: [PATCH] Remove unused variable fid --- src/mat73.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/mat73.c b/src/mat73.c index fe0cef0a..01bebc67 100644 --- a/src/mat73.c +++ b/src/mat73.c @@ -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: @@ -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; @@ -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; @@ -3061,7 +3057,7 @@ 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 ) @@ -3069,8 +3065,6 @@ Mat_VarReadDataLinear73(mat_t *mat, matvar_t *matvar, void *data, int start, int 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);