From b488eb4ecc5397876d43f49a6892aa848ad45bdf Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Tue, 9 Nov 2021 20:40:46 -0800 Subject: Fixes FUNC_ENTER warnings in VFDs due to recent init changes (#1178) --- src/H5FDcore.c | 3 +-- src/H5FDfamily.c | 5 ++--- src/H5FDint.c | 7 +++---- src/H5FDlog.c | 3 +-- src/H5FDsec2.c | 3 +-- src/H5FDsplitter.c | 3 +-- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 9d0d30a..21d0324 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -461,7 +461,7 @@ H5FD_core_init(void) char *lock_env_var = NULL; /* Environment variable pointer */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ - FUNC_ENTER_NOAPI(H5I_INVALID_HID) + FUNC_ENTER_NOAPI_NOERR /* Check the use disabled file locks environment variable */ lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); @@ -478,7 +478,6 @@ H5FD_core_init(void) /* Set return value */ ret_value = H5FD_CORE_g; -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_core_init() */ diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index e51b6eb..4e54197 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -282,9 +282,9 @@ done: hid_t H5FD_family_init(void) { - hid_t ret_value = H5I_INVALID_HID; /* Return value */ + hid_t ret_value = H5I_INVALID_HID; - FUNC_ENTER_NOAPI(H5I_INVALID_HID) + FUNC_ENTER_NOAPI_NOERR if (H5I_VFL != H5I_get_type(H5FD_FAMILY_g)) H5FD_FAMILY_g = H5FD_register(&H5FD_family_g, sizeof(H5FD_class_t), FALSE); @@ -292,7 +292,6 @@ H5FD_family_init(void) /* Set return value */ ret_value = H5FD_FAMILY_g; -done: FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_family_init() */ diff --git a/src/H5FDint.c b/src/H5FDint.c index c567499..d7fe33c 100644 --- a/src/H5FDint.c +++ b/src/H5FDint.c @@ -464,7 +464,7 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t * { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_NOERR /* Sanity checks */ HDassert(cls); @@ -476,7 +476,7 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t * /* Check if plugin name matches VFD class name */ if (cls->name && !HDstrcmp(cls->name, key->vfd.u.name)) *success = TRUE; - } /* end if */ + } else { /* Sanity check */ HDassert(key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE); @@ -484,9 +484,8 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t * /* Check if plugin value matches VFD class value */ if (cls->value == key->vfd.u.value) *success = TRUE; - } /* end else */ + } -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_check_plugin_load() */ diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 8ea08bc..4128582 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -243,7 +243,7 @@ H5FD_log_init(void) char *lock_env_var = NULL; /* Environment variable pointer */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ - FUNC_ENTER_NOAPI(H5I_INVALID_HID) + FUNC_ENTER_NOAPI_NOERR /* Check the use disabled file locks environment variable */ lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); @@ -260,7 +260,6 @@ H5FD_log_init(void) /* Set return value */ ret_value = H5FD_LOG_g; -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_log_init() */ diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index ca29eea..77cc58e 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -203,7 +203,7 @@ H5FD_sec2_init(void) char *lock_env_var = NULL; /* Environment variable pointer */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ - FUNC_ENTER_NOAPI(H5I_INVALID_HID) + FUNC_ENTER_NOAPI_NOERR /* Check the use disabled file locks environment variable */ lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); @@ -220,7 +220,6 @@ H5FD_sec2_init(void) /* Set return value */ ret_value = H5FD_SEC2_g; -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_sec2_init() */ diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 98d4488..b64a2b5 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -196,7 +196,7 @@ H5FD_splitter_init(void) { hid_t ret_value = H5I_INVALID_HID; - FUNC_ENTER_NOAPI(H5I_INVALID_HID) + FUNC_ENTER_NOAPI_NOERR H5FD_SPLITTER_LOG_CALL(__func__); @@ -205,7 +205,6 @@ H5FD_splitter_init(void) ret_value = H5FD_SPLITTER_g; -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_splitter_init() */ -- cgit v0.12