[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
This commit is contained in:
Quincey Koziol 2015-06-29 15:22:30 -05:00
parent 89115b11b0
commit ad37464819
7 changed files with 28 additions and 38 deletions

View File

@ -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

View File

@ -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)

View File

@ -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) \

View File

@ -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);

View File

@ -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 ) {

View File

@ -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 ) &&

View File

@ -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 {