summaryrefslogtreecommitdiffstats
path: root/test/cache_common.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-01-08 19:24:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-01-08 19:24:17 (GMT)
commit23bfde73c21eab60d9c1143230b2c67dc07b4311 (patch)
tree632f3b02e87d5d7afef9e0d6ee8c1db6e377cde8 /test/cache_common.c
parent2181d7b0c390ea32d138b7d56fd4b74aedfffe37 (diff)
downloadhdf5-23bfde73c21eab60d9c1143230b2c67dc07b4311.zip
hdf5-23bfde73c21eab60d9c1143230b2c67dc07b4311.tar.gz
hdf5-23bfde73c21eab60d9c1143230b2c67dc07b4311.tar.bz2
[svn-r18083] Description:
Correct Coverity issue #6 by removing debugging knob from error reporting code. Tested on: Mac OS X/32 10.6.3 (amazon) w/debug
Diffstat (limited to 'test/cache_common.c')
-rw-r--r--test/cache_common.c43
1 files changed, 14 insertions, 29 deletions
diff --git a/test/cache_common.c b/test/cache_common.c
index 4595d7c..568050a 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3257,7 +3257,6 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
hbool_t pin_flag_set;
hbool_t unpin_flag_set;
hbool_t size_changed_flag_set;
- hbool_t verbose = FALSE;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -3308,39 +3307,25 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
( entry_ptr->size != entry_ptr->header.size ) ||
( entry_ptr->addr != entry_ptr->header.addr ) ) {
- if ( verbose ) {
+ if ( result < 0 )
+ HDfprintf(stdout, "%s: H5C_unprotect() failed.\n", fcn_name);
- if ( result < 0 ) {
- HDfprintf(stdout, "%s: H5C_unprotect() failed.\n", fcn_name);
- }
+ if ( entry_ptr->header.is_protected )
+ HDfprintf(stdout, "%s: entry still protected?!?.\n", fcn_name);
- if ( entry_ptr->header.is_protected ) {
- HDfprintf(stdout, "%s: entry still protected?!?.\n",
- fcn_name);
- }
+ if ( entry_ptr->header.type != &(types[type]) )
+ HDfprintf(stdout, "%s: entry has bad type after unprotect.\n", fcn_name);
- if ( entry_ptr->header.type != &(types[type]) ) {
- HDfprintf(stdout,
- "%s: entry has bad type after unprotect.\n",
- fcn_name);
- }
+ if ( entry_ptr->size != entry_ptr->header.size )
+ HDfprintf(stdout, "%s: bad entry size after unprotect. e/a = %d/%d\n", fcn_name,
+ (int)(entry_ptr->size),
+ (int)(entry_ptr->header.size));
- if ( entry_ptr->size != entry_ptr->header.size ) {
- HDfprintf(stdout,
- "%s: bad entry size after unprotect. e/a = %d/%d\n",
- fcn_name,
- (int)(entry_ptr->size),
- (int)(entry_ptr->header.size));
- }
+ if ( entry_ptr->addr != entry_ptr->header.addr )
+ HDfprintf(stdout, "%s: bad entry addr after unprotect. e/a = 0x%llx/0x%llx\n", fcn_name,
+ (long long)(entry_ptr->addr),
+ (long long)(entry_ptr->header.addr));
- if ( entry_ptr->addr != entry_ptr->header.addr ) {
- HDfprintf(stdout,
- "%s: bad entry addr after unprotect. e/a = 0x%llx/0x%llx\n",
- fcn_name,
- (long long)(entry_ptr->addr),
- (long long)(entry_ptr->header.addr));
- }
- }
pass = FALSE;
failure_mssg = "error in H5C_unprotect().";