summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-11-16 15:04:16 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-11-16 15:04:16 (GMT)
commitef2857ec3809dfd2eb3f813471f4621004a76b78 (patch)
treed9ba530b949d973051e6df323883ea41a8d9cc13 /src
parentc3da7ac06fefe2a4f58d375391447197d6bdbdf1 (diff)
downloadhdf5-ef2857ec3809dfd2eb3f813471f4621004a76b78.zip
hdf5-ef2857ec3809dfd2eb3f813471f4621004a76b78.tar.gz
hdf5-ef2857ec3809dfd2eb3f813471f4621004a76b78.tar.bz2
HDFFV-10328 - move declaration to top of function
Diffstat (limited to 'src')
-rw-r--r--src/H5Z.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 2e7691f..c207aee 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -386,6 +386,7 @@ H5Z_unregister(H5Z_filter_t filter_id)
size_t filter_index; /* Local index variable for filter */
H5Z_object_t object;
herr_t ret_value = SUCCEED; /* Return value */
+ H5Z_class2_t *old_cls = NULL;
FUNC_ENTER_NOAPI(FAIL)
@@ -423,7 +424,7 @@ H5Z_unregister(H5Z_filter_t filter_id)
HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed")
/* deallocate plugin info name */
- H5Z_class2_t *old_cls = (H5Z_class2_t *)(H5Z_table_g+filter_index);
+ old_cls = (H5Z_class2_t *)(H5Z_table_g+filter_index);
if (old_cls->name)
old_cls->name = (char *)H5MM_xfree(old_cls->name);
/* Remove filter from table */