summaryrefslogtreecommitdiffstats
path: root/test/dsets.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-11-13 20:38:22 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:19:37 (GMT)
commitd1ceb04c5d837f4b594aeb27979ce6f586f2ea91 (patch)
tree20a1538797b03d2577eb720428f8edb3aeb2bc50 /test/dsets.c
parent34e51def7e14a991d399a2250f10ce7194210ca1 (diff)
downloadhdf5-d1ceb04c5d837f4b594aeb27979ce6f586f2ea91.zip
hdf5-d1ceb04c5d837f4b594aeb27979ce6f586f2ea91.tar.gz
hdf5-d1ceb04c5d837f4b594aeb27979ce6f586f2ea91.tar.bz2
Quiet decleration-after-statement warnings.
Diffstat (limited to 'test/dsets.c')
-rw-r--r--test/dsets.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/dsets.c b/test/dsets.c
index eaa469f..aa84833 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -7065,16 +7065,15 @@ static void
make_random_offset_and_increment(long nelts, long *offsetp, long *incp)
{
long inc;
-
- HDassert(0 < nelts);
-
- *offsetp = HDrandom() % nelts;
-
/* `maxinc` is chosen so that for any `x` in [0, nelts - 1],
* `x + maxinc` does not overflow a long.
*/
const long maxinc = MIN(nelts - 1, LONG_MAX - nelts);
+ HDassert(0 < nelts);
+
+ *offsetp = HDrandom() % nelts;
+
/* Choose a random number in [1, nelts - 1]. If its greatest divisor
* in common with `nelts` is 1, then it will "generate" the additive ring
* [0, nelts - 1], so let it be our increment. Otherwise, choose a new