summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-06-29 20:22:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-06-29 20:22:30 (GMT)
commitad37464819604c9a7fab98ceff91a21e053eda27 (patch)
tree4ff2e7ab9018e53aabbf1fe3be0ca5825bbaf9c0
parent89115b11b0ed2f51c6d80305301a60c7cba8c916 (diff)
downloadhdf5-ad37464819604c9a7fab98ceff91a21e053eda27.zip
hdf5-ad37464819604c9a7fab98ceff91a21e053eda27.tar.gz
hdf5-ad37464819604c9a7fab98ceff91a21e053eda27.tar.bz2
[svn-r27296] Description:
Correct error with braces around macro (in production builds), also clean up a few warnings. Tested on: MacOSX/64 10.10.3 (amazon) w/serial, parallel & production Linux/32 2.6 (jam) w/serial & parallel
-rw-r--r--src/H5AC.c2
-rw-r--r--src/H5C.c23
-rw-r--r--src/H5Cpkg.h6
-rw-r--r--src/H5Cprivate.h4
-rw-r--r--test/cache.c27
-rw-r--r--test/cache_common.c2
-rw-r--r--testpar/t_cache.c2
7 files changed, 28 insertions, 38 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index e6218d1..ff0ef51 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -1395,7 +1395,7 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
} /* end if */
#endif /* H5_HAVE_PARALLEL */
- if(H5C_unprotect(f, dxpl_id, type, addr, thing, flags) < 0)
+ if(H5C_unprotect(f, dxpl_id, addr, thing, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5C_unprotect() failed.")
#ifdef H5_HAVE_PARALLEL
diff --git a/src/H5C.c b/src/H5C.c
index e29da86..a60e519 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -171,8 +171,7 @@ static herr_t H5C_mark_tagged_entries(H5C_t * cache_ptr,
haddr_t tag);
static herr_t H5C_flush_marked_entries(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr);
+ hid_t dxpl_id);
#if H5C_DO_TAGGING_SANITY_CHECKS
static herr_t H5C_verify_tag(int id, haddr_t tag);
@@ -2881,8 +2880,6 @@ 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(NULL)
@@ -2924,6 +2921,10 @@ H5C_protect(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, NULL, "incorrect cache entry type")
#if H5C_DO_TAGGING_SANITY_CHECKS
+{
+ H5P_genplist_t *dxpl; /* dataset transfer property list */
+ haddr_t tag = HADDR_UNDEF;
+
/* The entry is already in the cache, but make sure that the tag value
being passed in via dxpl is still legal. This will ensure that had
the entry NOT been in the cache, tagging was still set up correctly
@@ -2946,6 +2947,7 @@ H5C_protect(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "tag verification failed");
} /* end if */
+}
#endif
hit = TRUE;
@@ -4696,7 +4698,6 @@ done:
herr_t
H5C_unprotect(H5F_t * f,
hid_t dxpl_id,
- const H5C_class_t * type,
haddr_t addr,
void * thing,
unsigned int flags)
@@ -4734,7 +4735,6 @@ H5C_unprotect(H5F_t * f,
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( type );
HDassert( H5F_addr_defined(addr) );
HDassert( thing );
HDassert( ! ( pin_entry && unpin_entry ) );
@@ -4745,7 +4745,6 @@ H5C_unprotect(H5F_t * f,
entry_ptr = (H5C_cache_entry_t *)thing;
HDassert( entry_ptr->addr == addr );
- HDassert( entry_ptr->type == type );
/* also set the dirtied variable if the dirtied field is set in
* the entry.
@@ -7924,8 +7923,9 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
/* start by updating the statistics */
if(clear_only) {
/* only log a clear if the entry was dirty */
- if(was_dirty)
+ if(was_dirty) {
H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr)
+ } /* end if */
} else if(write_entry) {
HDassert(was_dirty);
@@ -9687,7 +9687,7 @@ H5C_flush_tagged_entries(H5F_t * f, hid_t dxpl_id, H5C_t * cache_ptr, haddr_t ta
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't mark tagged entries")
/* Flush all marked entries */
- if(H5C_flush_marked_entries(f, dxpl_id, cache_ptr) < 0)
+ if(H5C_flush_marked_entries(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush marked entries")
done:
@@ -9760,7 +9760,7 @@ H5C_mark_tagged_entries(H5C_t * cache_ptr, haddr_t tag)
*-------------------------------------------------------------------------
*/
static herr_t
-H5C_flush_marked_entries(H5F_t * f, hid_t dxpl_id, H5C_t * cache_ptr)
+H5C_flush_marked_entries(H5F_t * f, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED;
@@ -9768,8 +9768,7 @@ H5C_flush_marked_entries(H5F_t * f, hid_t dxpl_id, H5C_t * cache_ptr)
/* Assertions */
HDassert(0); /* This function is not yet used. We shouldn't be in here yet. */
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(f != NULL);
/* Flush all marked entries */
if(H5C_flush_cache(f, dxpl_id, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0)
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 0dad4bb..814387b 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -595,7 +595,7 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \
{ \
(((cache_ptr)->clears)[(entry_ptr)->type->id])++; \
- if ( (entry_ptr)->is_pinned ) \
+ if((entry_ptr)->is_pinned) \
(((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
((entry_ptr)->clears)++; \
}
@@ -709,9 +709,9 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \
{ \
- if ( (entry_ptr)->is_pinned ) \
- (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
(((cache_ptr)->clears)[(entry_ptr)->type->id])++; \
+ if((entry_ptr)->is_pinned) \
+ (((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
}
#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 57cbc2d..5b152c8 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -1905,8 +1905,8 @@ H5_DLL void H5C_stats__reset(H5C_t *cache_ptr);
H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name);
H5_DLL herr_t H5C_unpin_entry(void *thing);
H5_DLL herr_t H5C_destroy_flush_dependency(void *parent_thing, void *child_thing);
-H5_DLL herr_t H5C_unprotect(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type,
- haddr_t addr, void *thing, unsigned int flags);
+H5_DLL herr_t H5C_unprotect(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *thing,
+ unsigned int flags);
H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr,
unsigned int tests);
H5_DLL herr_t H5C_ignore_tags(H5C_t *cache_ptr);
diff --git a/test/cache.c b/test/cache.c
index 26f7250..38adbda 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -14207,8 +14207,7 @@ check_resize_entry(void)
} else {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr, H5C__DIRTIED_FLAG);
+ entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result < 0 ) {
@@ -14293,8 +14292,7 @@ check_resize_entry(void)
} else {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr, H5C__DIRTIED_FLAG);
+ entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result < 0 ) {
@@ -14654,8 +14652,7 @@ check_resize_entry(void)
} else {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr, H5C__DIRTIED_FLAG);
+ entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result < 0 ) {
@@ -14742,8 +14739,7 @@ check_resize_entry(void)
} else {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr, H5C__DIRTIED_FLAG);
+ entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result < 0 ) {
@@ -16246,8 +16242,7 @@ check_double_pin_err(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr,
- (void *)entry_ptr, H5C__PIN_ENTRY_FLAG);
+ entry_ptr->addr, (void *)entry_ptr, H5C__PIN_ENTRY_FLAG);
if ( result > 0 ) {
@@ -16331,8 +16326,7 @@ check_double_unpin_err(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr,
- (void *)entry_ptr, H5C__UNPIN_ENTRY_FLAG);
+ entry_ptr->addr, (void *)entry_ptr, H5C__UNPIN_ENTRY_FLAG);
if ( result > 0 ) {
@@ -16612,8 +16606,7 @@ check_double_unprotect_err(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr,
- (void *)entry_ptr, H5C__NO_FLAGS_SET);
+ entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET);
if ( result > 0 ) {
@@ -16989,8 +16982,7 @@ check_unprotect_ro_dirty_err(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr,
- (void *)entry_ptr, H5C__DIRTIED_FLAG);
+ entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result >= 0 ) {
@@ -17033,8 +17025,7 @@ check_unprotect_ro_dirty_err(void)
if ( pass ) {
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr,
- (void *)entry_ptr, H5C__DIRTIED_FLAG);
+ entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result > 0 ) {
diff --git a/test/cache_common.c b/test/cache_common.c
index 8ccd7e3..f3da908 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3959,7 +3959,7 @@ unprotect_entry(H5F_t * file_ptr,
entry_ptr->is_dirty = TRUE;
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
- &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags);
+ entry_ptr->addr, (void *)entry_ptr, flags);
if ( ( result < 0 ) ||
( ( entry_ptr->header.is_protected ) &&
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 0988206..bb1ccc6 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -4996,7 +4996,7 @@ unlock_entry(H5F_t * file_ptr,
nerrors++;
if ( verbose ) {
- HDfprintf(stdout, "%d:%s: error in H5C_unprotect().\n",
+ HDfprintf(stdout, "%d:%s: error in H5AC_unprotect().\n",
world_mpi_rank, FUNC);
}
} else {