Discussion:
[erlang-patches] [erlang-bugs] Minor issue: Bad arity display for crypto:hash_update in R16-B03-1
unknown
2014-04-01 00:53:40 UTC
Permalink
When using deprecated crypto functions, warnings are displayed suggesting
use of recommended functions.
Use of crypto:hash_update/3 is recommended in a warning message , but
arity of crypto:hash_update is 2 (not 3).
Erlang R16B03-1 (erts-5.10.4) [source] [async-threads:10]
[kernel-poll:false]
Eshell V5.10.4 (abort with ^G)
1> c(to_reproduce).
to_reproduce.erl:5: Warning: crypto:md5_init/0 is deprecated and will be
removed in in a future release; use crypto:hash_init/1
to_reproduce.erl:6: Warning: crypto:md5_update/2 is deprecated and will be
removed in in a future release; use crypto:hash_update/3
{ok,to_reproduce}
2> to_reproduce:start().
<<1,35,69,103,137,171,205,239,254,220,186,152,118,84,50,
16,64,0,0,0,0,0,0,0,83,111,109,101,68,...>>
3> crypto:hash
hash/2 hash_final/1 hash_init/1 hash_update/2
3> crypto:hash
Here's a fix: https://github.com/erlang/otp/pull/322

--steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140331/abd06666/attachment.html>
Loading...