diff options
Diffstat (limited to 'src/H5E.c')
-rw-r--r-- | src/H5E.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -288,22 +288,21 @@ H5E_term_interface(void) FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5_interface_initialize_g) { - int ncls, nmsg, nstk; + int64_t ncls, nmsg, nstk; /* Check if there are any open error stacks, classes or messages */ ncls = H5I_nmembers(H5I_ERROR_CLASS); nmsg = H5I_nmembers(H5I_ERROR_MSG); nstk = H5I_nmembers(H5I_ERROR_STACK); - n = ncls + nmsg + nstk; - if(n > 0) { + if((ncls + nmsg + nstk) > 0) { /* Clear any outstanding error stacks */ if(nstk > 0) - H5I_clear_type(H5I_ERROR_STACK, FALSE, FALSE); + (void)H5I_clear_type(H5I_ERROR_STACK, FALSE, FALSE); /* Clear all the error classes */ if(ncls > 0) { - H5I_clear_type(H5I_ERROR_CLASS, FALSE, FALSE); + (void)H5I_clear_type(H5I_ERROR_CLASS, FALSE, FALSE); /* Reset the HDF5 error class, if its been closed */ if(H5I_nmembers(H5I_ERROR_CLASS) == 0) @@ -312,7 +311,7 @@ H5E_term_interface(void) /* Clear all the error messages */ if(nmsg > 0) { - H5I_clear_type(H5I_ERROR_MSG, FALSE, FALSE); + (void)H5I_clear_type(H5I_ERROR_MSG, FALSE, FALSE); /* Reset the HDF5 error messages, if they've been closed */ if(H5I_nmembers(H5I_ERROR_MSG) == 0) { @@ -320,19 +319,21 @@ H5E_term_interface(void) #include "H5Eterm.h" } /* end if */ } /* end if */ + + n++; /*H5I*/ } /* end if */ else { /* Close deprecated interface */ n += H5E__term_deprec_interface(); /* Destroy the error class, message, and stack id groups */ - H5I_dec_type_ref(H5I_ERROR_STACK); - H5I_dec_type_ref(H5I_ERROR_CLASS); - H5I_dec_type_ref(H5I_ERROR_MSG); + (void)H5I_dec_type_ref(H5I_ERROR_STACK); + (void)H5I_dec_type_ref(H5I_ERROR_CLASS); + (void)H5I_dec_type_ref(H5I_ERROR_MSG); + n++; /*H5I*/ /* Mark closed */ H5_interface_initialize_g = 0; - n = 1; /*H5I*/ } /* end else */ } /* end if */ |