From 47073183e39484499aacb1fdfa1a817340b2a16b Mon Sep 17 00:00:00 2001 From: Mike McGreevy Date: Wed, 16 Jun 2010 14:28:24 -0500 Subject: [svn-r19011] Purpose: Clean up code. Description: Reorganize to remove mixed declarations and code (which should satisfy windows compile). Tested: jam, blue print, gandalf Windows 7 w/ VS Express 2008 (on VMware) --- src/H5C.c | 4 ++-- src/H5SM.c | 2 +- src/H5private.h | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/H5C.c b/src/H5C.c index 61ade13..a3a857a 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -3517,6 +3517,8 @@ H5C_protect(H5F_t * f, size_t empty_space; void * thing; H5C_cache_entry_t * entry_ptr; + haddr_t tag = HADDR_UNDEF; + H5P_genplist_t *dxpl; /* dataset transfer property list */ void * ret_value; /* Return value */ FUNC_ENTER_NOAPI(H5C_protect, NULL) @@ -3564,8 +3566,6 @@ H5C_protect(H5F_t * f, the entry NOT been in the cache, tagging was still set up correctly and it would have received a legal tag value after getting loaded from disk. */ - haddr_t tag = HADDR_UNDEF; - H5P_genplist_t *dxpl; /* dataset transfer property list */ /* Get the dataset transfer property list */ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object_verify(primary_dxpl_id, H5I_GENPROP_LST))) diff --git a/src/H5SM.c b/src/H5SM.c index 3052cce..19e5f8a 100755 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -133,7 +133,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d unsigned x; /* Local index variable */ herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_TAG(H5SM_init, dxpl_id, H5AC__SOHM_TAG, NULL) + FUNC_ENTER_NOAPI_TAG(H5SM_init, dxpl_id, H5AC__SOHM_TAG, FAIL) HDassert(f); /* File should not already have a SOHM table */ diff --git a/src/H5private.h b/src/H5private.h index 5511ee9..e18bec6 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1934,20 +1934,18 @@ static herr_t H5_INTERFACE_INIT_FUNC(void); * and FUNC_ENTER_NOAPI_NOINIT macros when the function needs to set * up a metadata tag. */ #define FUNC_ENTER_NOAPI_TAG(func_name, dxpl_id, tag, err) { \ - FUNC_ENTER_COMMON(func_name, !H5_IS_API(#func_name)); \ - \ haddr_t prev_tag = HADDR_UNDEF; \ hid_t tag_dxpl_id = dxpl_id; \ + FUNC_ENTER_COMMON(func_name, !H5_IS_API(#func_name)); \ if(H5AC_tag(tag_dxpl_id, tag, &prev_tag)<0) \ HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \ - \ FUNC_ENTER_NOAPI_INIT(func_name,err) \ { #define FUNC_ENTER_NOAPI_NOINIT_TAG(func_name, dxpl_id, tag, err) { \ - FUNC_ENTER_COMMON(func_name, !H5_IS_API(#func_name)); \ haddr_t prev_tag = HADDR_UNDEF; \ hid_t tag_dxpl_id = dxpl_id; \ + FUNC_ENTER_COMMON(func_name, !H5_IS_API(#func_name)); \ if(H5AC_tag(tag_dxpl_id, tag, &prev_tag)<0) \ HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \ H5_PUSH_FUNC(#func_name) \ @@ -2011,10 +2009,8 @@ static herr_t H5_INTERFACE_INIT_FUNC(void); /* Use this macro when exiting a function that set up a metadata tag */ #define FUNC_LEAVE_NOAPI_TAG(ret_value, err) \ - \ if(H5AC_tag(tag_dxpl_id, prev_tag, NULL)<0) \ HDONE_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \ - \ H5_POP_FUNC \ return(ret_value); \ } /*end scope from end of FUNC_ENTER*/ \ -- cgit v0.12