diff options
author | David Young <dyoung@hdfgroup.org> | 2019-11-27 17:26:02 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-11-27 17:26:02 (GMT) |
commit | 0108072f7a746b809952d5cc560577f931b64f71 (patch) | |
tree | da729387e6ffc48a0fc3f2c73d57ff3e8b11457c /test/dsets.c | |
parent | 8fb9fb5d4dab0b7e9a9884611d0511e2a03228a2 (diff) | |
download | hdf5-0108072f7a746b809952d5cc560577f931b64f71.zip hdf5-0108072f7a746b809952d5cc560577f931b64f71.tar.gz hdf5-0108072f7a746b809952d5cc560577f931b64f71.tar.bz2 |
Revert "Make a squash commit of 'Quiet some warnings by adjusting warnings level and fixing some code.' (commit 5c911d8baf3)"
Diffstat (limited to 'test/dsets.c')
-rw-r--r-- | test/dsets.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/dsets.c b/test/dsets.c index aa84833..eaa469f 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7065,15 +7065,16 @@ static void make_random_offset_and_increment(long nelts, long *offsetp, long *incp) { long inc; - /* `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; + /* `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); + /* 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 |