Re: [erlang-bugs] Minor issue: Bad arity display for crypto:hash_update in R16-B03-1
Steve Vinoski <[email protected]> Mon, 31 Mar 2014 20:53:40 -0400
| Newsgroups | gmane.comp.lang.erlang.patches,gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CAO+zUOUuE1QgqeYmUGoq6=LBgC+GsDJxr3xd0DmvQbzdujLTMg@mail.gmail.com> |
On Mon, Mar 31, 2014 at 4:08 PM, Alexei Dodon <[email protected]> wrote: > 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). > > > > Example: > > 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 _______________________________________________ erlang-patches mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-patches