summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 8b23736..486b5c0 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1436,20 +1436,23 @@ H5T_unlock_cb(void *_dt, hid_t UNUSED id, void UNUSED *key)
int
H5T_term_interface(void)
{
- int i, nprint=0, n=0;
- H5T_path_t *path = NULL;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
+ int i, nprint = 0;
+
/* Unregister all conversion functions */
for(i = 0; i < H5T_g.npaths; i++) {
+ H5T_path_t *path;
+
path = H5T_g.path[i];
HDassert(path);
if(path->func) {
H5T__print_stats(path, &nprint/*in,out*/);
path->cdata.command = H5T_CONV_FREE;
- if((path->func)(FAIL, FAIL, &(path->cdata), (size_t)0,
+ if((path->func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0,
(size_t)0, (size_t)0, NULL, NULL,H5AC_dxpl_id) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
@@ -1486,7 +1489,9 @@ H5T_term_interface(void)
/* Close deprecated interface */
n += H5T__term_deprec_interface();
- H5I_dec_type_ref(H5I_DATATYPE);
+ /* Destroy the datatype object id group */
+ (void)H5I_dec_type_ref(H5I_DATATYPE);
+ n++; /*H5I*/
/* Reset all the datatype IDs */
H5T_IEEE_F32BE_g = FAIL;
@@ -1586,7 +1591,6 @@ H5T_term_interface(void)
/* Mark interface as closed */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
} /* end if */
FUNC_LEAVE_NOAPI(n)
@@ -2580,7 +2584,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
/* Shut down path */
H5T__print_stats(path, &nprint);
path->cdata.command = H5T_CONV_FREE;
- if((path->func)(FAIL, FAIL, &(path->cdata),
+ if((path->func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata),
(size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T)) {
@@ -4394,7 +4398,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
HDsnprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op");
H5T_g.path[0]->func = H5T__conv_noop;
H5T_g.path[0]->cdata.command = H5T_CONV_INIT;
- if(H5T__conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
+ if(H5T__conv_noop((hid_t)FAIL, (hid_t)FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
@@ -4553,7 +4557,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
HDassert(table == H5T_g.path[md]);
H5T__print_stats(table, &nprint/*in,out*/);
table->cdata.command = H5T_CONV_FREE;
- if((table->func)(FAIL, FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
+ if((table->func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T)) {
fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free "