diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-05-07 19:37:48 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-05-07 19:37:48 (GMT) |
commit | bbe03d73613afbcdeca14c045c8b90fac37e0fe8 (patch) | |
tree | 6c6468ecf923ad7f1101e0719d2af1894e63ad64 /test/bittests.c | |
parent | c952661afbac41d4bf2622899bf2a4c2c02b07b5 (diff) | |
download | hdf5-bbe03d73613afbcdeca14c045c8b90fac37e0fe8.zip hdf5-bbe03d73613afbcdeca14c045c8b90fac37e0fe8.tar.gz hdf5-bbe03d73613afbcdeca14c045c8b90fac37e0fe8.tar.bz2 |
[svn-r10736] Purpose:
Code cleanup
Description:
Clean up some compiler warnings
Platforms tested:
FreeBSD 4.11 (sleipnir)
h5committest
Diffstat (limited to 'test/bittests.c')
-rw-r--r-- | test/bittests.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/bittests.c b/test/bittests.c index cb038f7..872a01a 100644 --- a/test/bittests.c +++ b/test/bittests.c @@ -174,9 +174,9 @@ test_copy (void) TESTING("bit copy operations"); for (i=0; i<NTESTS; i++) { - s_offset = rand() % (8*sizeof v1); - d_offset = rand() % (8*sizeof v2); - size = (unsigned)rand() % MIN (8*sizeof(v1), 8*sizeof(v2)); + s_offset = HDrand() % (8*sizeof v1); + d_offset = HDrand() % (8*sizeof v2); + size = (unsigned)HDrand() % MIN (8*sizeof(v1), 8*sizeof(v2)); size = MIN3 (size, 8*sizeof(v1)-s_offset, 8*sizeof(v2)-d_offset); memset (v1, 0xff, sizeof v1); memset (v2, 0x00, sizeof v2); @@ -296,11 +296,11 @@ test_shift (void) TESTING("bit shift operations"); for (i=0; i<NTESTS; i++) { - offset = rand() % (8*sizeof vector); - size = (unsigned)rand() % (8*sizeof(vector)-offset); + offset = HDrand() % (8*sizeof vector); + size = (unsigned)HDrand() % (8*sizeof(vector)-offset); /* Don't want size to be 0 */ if(size == 0) continue; - shift_dist = rand() % size; + shift_dist = HDrand() % size; /*-------- LEFT-shift some bits and make sure something was shifted --------*/ memset (vector, 0x00, sizeof vector); @@ -429,8 +429,8 @@ test_increment (void) TESTING("bit increment operations"); for (i=0; i<NTESTS; i++) { - offset = rand() % (8*sizeof vector); - size = (unsigned)rand() % (8*sizeof(vector)-offset); + offset = HDrand() % (8*sizeof vector); + size = (unsigned)HDrand() % (8*sizeof(vector)-offset); /* Don't want size to be 0 */ if(size == 0) continue; @@ -516,8 +516,8 @@ test_decrement (void) TESTING("bit decrement operations"); for (i=0; i<NTESTS; i++) { - offset = rand() % (8*sizeof vector); - size = (unsigned)rand() % (8*sizeof(vector)-offset); + offset = HDrand() % (8*sizeof vector); + size = (unsigned)HDrand() % (8*sizeof(vector)-offset); /* Don't want size to be 0 */ if(size == 0) continue; @@ -588,8 +588,8 @@ test_negate (void) TESTING("bit negate operations"); for (i=0; i<NTESTS; i++) { - offset = rand() % (8*sizeof vector); - size = (unsigned)rand() % (8*sizeof(vector)-offset); + offset = HDrand() % (8*sizeof vector); + size = (unsigned)HDrand() % (8*sizeof(vector)-offset); /* Don't want size to be 0 */ if(size == 0) continue; @@ -688,8 +688,8 @@ test_set (void) TESTING("bit set operations"); for (i=0; i<NTESTS; i++) { - d_offset = rand() % (8*sizeof v2); - size = (unsigned)rand() % (8*sizeof(v2)); + d_offset = HDrand() % (8*sizeof v2); + size = (unsigned)HDrand() % (8*sizeof(v2)); size = MIN (size, 8*sizeof(v2)-d_offset); memset (v2, 0x00, sizeof v2); @@ -805,8 +805,8 @@ test_clear (void) TESTING("bit clear operations"); for (i=0; i<NTESTS; i++) { - d_offset = rand() % (8*sizeof v2); - size = (unsigned)rand() % (8*sizeof(v2)); + d_offset = HDrand() % (8*sizeof v2); + size = (unsigned)HDrand() % (8*sizeof(v2)); size = MIN (size, 8*sizeof(v2)-d_offset); memset (v2, 0xff, sizeof v2); |