diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-08-11 19:13:45 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-08-11 19:13:45 (GMT) |
commit | 88fb6b1374e748b06826e17ca65c15087ae5b5ac (patch) | |
tree | 7c550af01bb506aa5d5bb9208abad6687f7b0f3a /src | |
parent | 2a5454616a653b9830c103be7381af28ba397a3d (diff) | |
download | hdf5-88fb6b1374e748b06826e17ca65c15087ae5b5ac.zip hdf5-88fb6b1374e748b06826e17ca65c15087ae5b5ac.tar.gz hdf5-88fb6b1374e748b06826e17ca65c15087ae5b5ac.tar.bz2 |
[svn-r25531] remove use of C99 PRI that failed on windows in dtypes.c
fix bugs where hid_t were assumed to be 32 bit ints or herr_t.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5C.c | 2 | ||||
-rw-r--r-- | src/H5FDcore.c | 13 | ||||
-rw-r--r-- | src/H5FDdirect.c | 10 | ||||
-rw-r--r-- | src/H5FDfamily.c | 10 | ||||
-rw-r--r-- | src/H5FDlog.c | 13 | ||||
-rw-r--r-- | src/H5FDmpio.c | 10 | ||||
-rw-r--r-- | src/H5FDsec2.c | 13 | ||||
-rw-r--r-- | src/H5P.c | 4 | ||||
-rw-r--r-- | src/H5S.c | 2 |
9 files changed, 55 insertions, 22 deletions
@@ -9840,7 +9840,7 @@ H5C_tag_entry(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr, hid_t dxpl_id) { H5P_genplist_t *dxpl; /* dataset transfer property list */ haddr_t tag; /* Tag address */ - hid_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5FDcore.c b/src/H5FDcore.c index d1d4337..7d643d7 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -433,17 +433,22 @@ done: * * Purpose: Initializes any interface-specific data or routines. * - * Return: Success: The driver ID for the core driver. - * Failure: Negative. + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ static herr_t H5FD_core_init_interface(void) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + herr_t ret_value = SUCCEED; - FUNC_LEAVE_NOAPI(H5FD_core_init()) + FUNC_ENTER_NOAPI_NOINIT + + if(H5FD_core_init() < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize core VFD") + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_core_init_interface() */ diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 079554d..0c68315 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -200,9 +200,15 @@ DESCRIPTION static herr_t H5FD_direct_init_interface(void) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT - FUNC_LEAVE_NOAPI(H5FD_direct_init()) + if(H5FD_direct_init() < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize direct VFD") + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_direct_init_interface() */ diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 75c75ad..1728d13 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -161,9 +161,15 @@ DESCRIPTION static herr_t H5FD_family_init_interface(void) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT - FUNC_LEAVE_NOAPI(H5FD_family_init()) + if(H5FD_family_init() < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize family VFD") + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_family_init_interface() */ diff --git a/src/H5FDlog.c b/src/H5FDlog.c index fdc2c92..b35dcf3 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -229,17 +229,22 @@ H5FL_DEFINE_STATIC(H5FD_log_t); * * Purpose: Initializes any interface-specific data or routines. * - * Return: Success: The driver ID for the log driver. - * Failure: Negative. + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ static herr_t H5FD_log_init_interface(void) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + if(H5FD_log_init() < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize log VFD") - FUNC_LEAVE_NOAPI(H5FD_log_init()) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_log_init_interface() */ diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 8162ccd..1a768c2 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -180,9 +180,15 @@ DESCRIPTION static herr_t H5FD_mpio_init_interface(void) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT - FUNC_LEAVE_NOAPI(H5FD_mpio_init()) + if(H5FD_mpio_init() < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize mpio VFD") + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_mpio_init_interface() */ diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index ca5127e..4f7c3d8 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -187,17 +187,22 @@ H5FL_DEFINE_STATIC(H5FD_sec2_t); * * Purpose: Initializes any interface-specific data or routines. * - * Return: Success: The driver ID for the sec2 driver. - * Failure: Negative + * Return: Non-negative on success/Negative on failure * *------------------------------------------------------------------------- */ static herr_t H5FD_sec2_init_interface(void) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + if(H5FD_sec2_init() < 0) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize sec2 VFD") - FUNC_LEAVE_NOAPI(H5FD_sec2_init()) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* H5FD_sec2_init_interface() */ @@ -886,7 +886,7 @@ herr_t H5Pencode(hid_t plist_id, void *buf, size_t *nalloc) { H5P_genplist_t *plist; /* Property list to query */ - hid_t ret_value = SUCCEED; /* return value */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("e", "i*x*z", plist_id, buf, nalloc); @@ -1684,7 +1684,7 @@ done: herr_t H5Pclose_class(hid_t cls_id) { - hid_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", cls_id); @@ -467,7 +467,7 @@ H5Sextent_copy(hid_t dst_id,hid_t src_id) { H5S_t *src; H5S_t *dst; - hid_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) H5TRACE2("e", "ii", dst_id, src_id); |