summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-02-28 05:45:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-02-28 05:45:55 (GMT)
commit5db402afbb6be6a4219ccd517d0462c5c6cc26f7 (patch)
tree9315120be0d040146e0dcec8ced3a25672666c88 /testpar
parente5fb4191de1129f58cc7b9b8ee67f4cec1488f39 (diff)
downloadhdf5-5db402afbb6be6a4219ccd517d0462c5c6cc26f7.zip
hdf5-5db402afbb6be6a4219ccd517d0462c5c6cc26f7.tar.gz
hdf5-5db402afbb6be6a4219ccd517d0462c5c6cc26f7.tar.bz2
Corrected version of 4b5e05c084f93c35dae946c2c9e814d565a613b0:
Fix some more signed -> unsigned value issues with cache data structures, also misc. style cleanups. All to align w/incoming page_buffering changes.
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_cache.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 039b3ab..568c28f 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -333,7 +333,7 @@ struct mssg_t
haddr_t base_addr;
unsigned len;
int ver;
- int count;
+ unsigned count;
unsigned magic;
};
@@ -485,8 +485,8 @@ static hbool_t take_down_cache(hid_t fid, H5C_t * cache_ptr);
static hbool_t verify_entry_reads(haddr_t addr, int expected_entry_reads);
static hbool_t verify_entry_writes(haddr_t addr, int expected_entry_writes);
static hbool_t verify_total_reads(int expected_total_reads);
-static hbool_t verify_total_writes(int expected_total_writes);
-static void verify_writes(int num_writes, haddr_t * written_entries_tbl);
+static hbool_t verify_total_writes(unsigned expected_total_writes);
+static void verify_writes(unsigned num_writes, haddr_t * written_entries_tbl);
static void unlock_entry(H5F_t * file_ptr, int32_t type, unsigned int flags);
static void unpin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global,
hbool_t dirty, hbool_t via_unprotect);
@@ -1214,7 +1214,7 @@ setup_derived_types(void)
int result;
MPI_Datatype mpi_types[9] = {MPI_INT, MPI_INT, MPI_INT, MPI_LONG,
HADDR_AS_MPI_TYPE, MPI_INT, MPI_INT,
- MPI_INT, MPI_UNSIGNED};
+ MPI_UNSIGNED, MPI_UNSIGNED};
int block_len[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
MPI_Aint displs[9];
struct mssg_t sample; /* used to compute displacements */
@@ -4334,15 +4334,15 @@ setup_cache_for_test(hid_t * fid_ptr,
*
*****************************************************************************/
static void
-verify_writes(int num_writes,
+verify_writes(unsigned num_writes,
haddr_t * written_entries_tbl)
{
const hbool_t report = FALSE;
hbool_t proceed = TRUE;
int i = 0;
+ unsigned u;
HDassert( world_mpi_rank != world_server_mpi_rank );
- HDassert( num_writes >= 0 );
HDassert( ( num_writes == 0 ) ||
( written_entries_tbl != NULL ) );
@@ -4367,10 +4367,10 @@ verify_writes(int num_writes,
proceed = verify_total_writes(num_writes);
}
- while ( ( proceed ) && ( i < num_writes ) )
+ while ( ( proceed ) && ( u < num_writes ) )
{
- proceed = verify_entry_writes(written_entries_tbl[i], 1);
- i++;
+ proceed = verify_entry_writes(written_entries_tbl[u], 1);
+ u++;
}
/* barrier to ensure that all other processes have finished verifying
@@ -4399,12 +4399,12 @@ verify_writes(int num_writes,
if ( proceed ) {
- HDfprintf(stdout, "%d:%s: verified %d writes.\n",
+ HDfprintf(stdout, "%d:%s: verified %u writes.\n",
world_mpi_rank, FUNC, num_writes);
} else {
- HDfprintf(stdout, "%d:%s: FAILED to verify %d writes.\n",
+ HDfprintf(stdout, "%d:%s: FAILED to verify %u writes.\n",
world_mpi_rank, FUNC, num_writes);
}
@@ -4929,10 +4929,10 @@ verify_total_reads(int expected_total_reads)
*
*****************************************************************************/
static hbool_t
-verify_total_writes(int expected_total_writes)
+verify_total_writes(unsigned expected_total_writes)
{
hbool_t success = TRUE; /* will set to FALSE if appropriate. */
- long reported_total_writes;
+ unsigned reported_total_writes;
struct mssg_t mssg;
if ( success ) {
@@ -4997,7 +4997,7 @@ verify_total_writes(int expected_total_writes)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: reported/expected total writes mismatch (%ld/%ld).\n",
+ "%d:%s: reported/expected total writes mismatch (%u/%u).\n",
world_mpi_rank, FUNC,
reported_total_writes, expected_total_writes);
}
@@ -5319,7 +5319,7 @@ server_smoke_check(void)
if ( success ) {
- success = verify_total_writes(world_mpi_size - 1);
+ success = verify_total_writes((unsigned)(world_mpi_size - 1));
}
if ( success ) {
@@ -5423,7 +5423,7 @@ server_smoke_check(void)
if ( success ) {
- success = verify_total_writes(world_mpi_size - 1);
+ success = verify_total_writes((unsigned)(world_mpi_size - 1));
}
if ( success ) {