diff options
author | Hans Bolinder <[email protected]> | 2016-02-17 09:19:08 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-02-17 09:19:08 +0100 |
commit | 0d5820c44dde5875d322a84eab6ce4227fe19bec (patch) | |
tree | 1b25d01a0c7cc5dc53f89dcbbf7a5eb891b5d7a6 /lib/stdlib/src/rand.erl | |
parent | f6743c5263b67013951f36e56d942d7d89ba8ba2 (diff) | |
parent | 3270b7f32c71bf8f7637a61a09dd0e9a2dbfc8d1 (diff) | |
download | otp-0d5820c44dde5875d322a84eab6ce4227fe19bec.tar.gz otp-0d5820c44dde5875d322a84eab6ce4227fe19bec.tar.bz2 otp-0d5820c44dde5875d322a84eab6ce4227fe19bec.zip |
Merge branch 'hb/add_dialyzer_suppressions/OTP-12862' into maint
* hb/add_dialyzer_suppressions/OTP-12862:
xmerl: Remove 'no_return' Dialyzer warnings
xmerl: Add suppression of Dialyzer warnings
eunit: Add suppression of Dialyzer warnings
debugger: Add suppression of Dialyzer warnings
kernel: Add suppression of Dialyzer warnings
mnesia: Add suppression of Dialyzer warnings
observer: Add suppression of Dialyzer warnings
runtime_tools: Add suppression of Dialyzer warnings
stdlib: Add suppression of Dialyzer warnings
test_server: Add suppression of Dialyzer warnings
tools: Add suppression of Dialyzer warnings
Diffstat (limited to 'lib/stdlib/src/rand.erl')
-rw-r--r-- | lib/stdlib/src/rand.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/stdlib/src/rand.erl b/lib/stdlib/src/rand.erl index dc060e82d9..d455abf7b0 100644 --- a/lib/stdlib/src/rand.erl +++ b/lib/stdlib/src/rand.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2015. All Rights Reserved. +%% Copyright Ericsson AB 2015-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -256,6 +256,8 @@ exs64_uniform(Max, {Alg, R}) -> %% ===================================================================== -type exsplus_state() :: nonempty_improper_list(uint58(), uint58()). +-dialyzer({no_improper_lists, exsplus_seed/1}). + exsplus_seed({A1, A2, A3}) -> {_, R1} = exsplus_next([(((A1 * 4294967197) + 1) band ?UINT58MASK)| (((A2 * 4294967231) + 1) band ?UINT58MASK)]), @@ -263,6 +265,8 @@ exsplus_seed({A1, A2, A3}) -> tl(R1)]), R2. +-dialyzer({no_improper_lists, exsplus_next/1}). + %% Advance xorshift116+ state for one step and generate 58bit unsigned integer -spec exsplus_next(exsplus_state()) -> {uint58(), exsplus_state()}. exsplus_next([S1|S0]) -> |