From 59f010ec2eccfe8420b708272a8ca58b08759e4f Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 26 Jun 2024 17:41:03 -0500 Subject: [PATCH] Removed unnecessary call to H5E_clear_stack (#4607) H5FO_opened and H5SL_search don't push errors on the stack --- src/H5Dint.c | 3 --- src/H5Gint.c | 4 ---- src/H5Tcommit.c | 3 --- 3 files changed, 10 deletions(-) diff --git a/src/H5Dint.c b/src/H5Dint.c index 8f28afb48ef..700d8306604 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1494,9 +1494,6 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id) /* Check if dataset was already open */ if (NULL == (shared_fo = (H5D_shared_t *)H5FO_opened(dataset->oloc.file, dataset->oloc.addr))) { - /* Clear any errors from H5FO_opened() */ - H5E_clear_stack(); - /* Open the dataset object */ if (H5D__open_oid(dataset, dapl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found"); diff --git a/src/H5Gint.c b/src/H5Gint.c index a7268adcbba..2580bf08ce0 100644 --- a/src/H5Gint.c +++ b/src/H5Gint.c @@ -437,10 +437,6 @@ H5G_open(const H5G_loc_t *loc) /* Check if group was already open */ if ((shared_fo = (H5G_shared_t *)H5FO_opened(grp->oloc.file, grp->oloc.addr)) == NULL) { - - /* Clear any errors from H5FO_opened() */ - H5E_clear_stack(); - /* Open the group object */ if (H5G__open_oid(grp) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found"); diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index e1b4e0d1a7a..56b22042d66 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -1036,9 +1036,6 @@ H5T_open(const H5G_loc_t *loc) /* Check if datatype was already open */ if (NULL == (shared_fo = (H5T_shared_t *)H5FO_opened(loc->oloc->file, loc->oloc->addr))) { - /* Clear any errors from H5FO_opened() */ - H5E_clear_stack(); - /* Open the datatype object */ if (NULL == (dt = H5T__open_oid(loc))) HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "not found");