This is an automated email from the ASF dual-hosted git repository. jaydoane pushed a commit to branch compiler-warnings-fixes in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 0d16dca13c7456668341e0ec0117766ea4d75697 Author: Jay Doane <[email protected]> AuthorDate: Sat Jun 18 08:17:45 2022 -0700 Fix deprecated function warning Function `httpd_util:hexlist_to_integer/1` will be removed in OTP 26. --- src/mem3/src/mem3.erl | 4 ++-- src/mem3/src/mem3_reshard_httpd.erl | 4 ++-- src/mem3/src/mem3_util.erl | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mem3/src/mem3.erl b/src/mem3/src/mem3.erl index 5a985b7f8..eff3f2138 100644 --- a/src/mem3/src/mem3.erl +++ b/src/mem3/src/mem3.erl @@ -323,8 +323,8 @@ range(#ordered_shard{range = Range}) -> Range; range(<<"shards/", Start:8/binary, "-", End:8/binary, "/", _/binary>>) -> [ - httpd_util:hexlist_to_integer(binary_to_list(Start)), - httpd_util:hexlist_to_integer(binary_to_list(End)) + list_to_integer(binary_to_list(Start), 16), + list_to_integer(binary_to_list(End), 16) ]. allowed_nodes() -> diff --git a/src/mem3/src/mem3_reshard_httpd.erl b/src/mem3/src/mem3_reshard_httpd.erl index 5abe8025c..509661d9f 100644 --- a/src/mem3/src/mem3_reshard_httpd.erl +++ b/src/mem3/src/mem3_reshard_httpd.erl @@ -295,8 +295,8 @@ validate_range(<<BBin:8/binary, "-", EBin:8/binary>>) -> {B, E} = try { - httpd_util:hexlist_to_integer(binary_to_list(BBin)), - httpd_util:hexlist_to_integer(binary_to_list(EBin)) + list_to_integer(binary_to_list(BBin), 16), + list_to_integer(binary_to_list(EBin), 16) } catch _:_ -> diff --git a/src/mem3/src/mem3_util.erl b/src/mem3/src/mem3_util.erl index 8547fc071..f454e3eb1 100644 --- a/src/mem3/src/mem3_util.erl +++ b/src/mem3/src/mem3_util.erl @@ -221,8 +221,8 @@ build_shards_by_node(DbName, DocProps) -> lists:map( fun(Range) -> [B, E] = string:tokens(?b2l(Range), "-"), - Beg = httpd_util:hexlist_to_integer(B), - End = httpd_util:hexlist_to_integer(E), + Beg = list_to_integer(B, 16), + End = list_to_integer(E, 16), name_shard( #shard{ dbname = DbName, @@ -247,8 +247,8 @@ build_shards_by_range(DbName, DocProps) -> lists:map( fun({Node, Order}) -> [B, E] = string:tokens(?b2l(Range), "-"), - Beg = httpd_util:hexlist_to_integer(B), - End = httpd_util:hexlist_to_integer(E), + Beg = list_to_integer(B, 16), + End = list_to_integer(E, 16), name_shard( #ordered_shard{ dbname = DbName,
