You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ji...@apache.org on 2025/09/17 16:20:45 UTC
(couchdb) branch fix-compilation-warnings created (now dc55db23f)
This is an automated email from the ASF dual-hosted git repository.
jiahuili430 pushed a change to branch fix-compilation-warnings
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at dc55db23f Replace `gen_server:format_status/2` to `format_status/1`
This branch includes the following new commits:
new dc55db23f Replace `gen_server:format_status/2` to `format_status/1`
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(couchdb) 01/01: Replace `gen_server:format_status/2` to `format_status/1`
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiahuili430 pushed a commit to branch fix-compilation-warnings
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit dc55db23f2fa359da19ab2715cbf0a27c95a9d9d
Author: Jiahui Li <li...@gmail.com>
AuthorDate: Wed Sep 17 11:04:31 2025 -0500
Replace `gen_server:format_status/2` to `format_status/1`
Fix the following warnings:
```log
Warning: the callback gen_server:format_status(_,_) is deprecated; use format_status/1 instead
```
---
src/couch/src/couch_file.erl | 4 ++--
src/couch_replicator/src/couch_replicator_auth_session.erl | 4 ++--
src/couch_replicator/src/couch_replicator_httpc_pool.erl | 4 ++--
src/couch_replicator/src/couch_replicator_scheduler.erl | 4 ++--
src/couch_replicator/src/couch_replicator_scheduler_job.erl | 4 ++--
src/couch_replicator/src/couch_replicator_worker.erl | 4 ++--
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/couch/src/couch_file.erl b/src/couch/src/couch_file.erl
index 9efc7978e..c2f161a69 100644
--- a/src/couch/src/couch_file.erl
+++ b/src/couch/src/couch_file.erl
@@ -51,7 +51,7 @@
-export([delete/2, delete/3, nuke_dir/2, init_delete_dir/1]).
% gen_server callbacks
--export([init/1, terminate/2, format_status/2]).
+-export([init/1, terminate/2, format_status/1]).
-export([handle_call/3, handle_cast/2, handle_info/2]).
%% helper functions
@@ -621,7 +621,7 @@ handle_info({'DOWN', Ref, process, _Pid, _Info}, #file{db_monitor = Ref} = File)
false -> {noreply, File}
end.
-format_status(_Opt, [PDict, #file{} = File]) ->
+format_status([PDict, #file{} = File]) ->
{_Fd, FilePath} = couch_util:get_value(couch_file_fd, PDict),
[{data, [{"State", File}, {"InitialFilePath", FilePath}]}].
diff --git a/src/couch_replicator/src/couch_replicator_auth_session.erl b/src/couch_replicator/src/couch_replicator_auth_session.erl
index 8f0be0a1d..3112c8b6f 100644
--- a/src/couch_replicator/src/couch_replicator_auth_session.erl
+++ b/src/couch_replicator/src/couch_replicator_auth_session.erl
@@ -62,7 +62,7 @@
handle_call/3,
handle_cast/2,
handle_info/2,
- format_status/2
+ format_status/1
]).
-include_lib("ibrowse/include/ibrowse.hrl").
@@ -154,7 +154,7 @@ handle_info(Msg, State) ->
couch_log:error("~p : Received un-expected message ~p", [?MODULE, Msg]),
{noreply, State}.
-format_status(_Opt, [_PDict, State]) ->
+format_status([_PDict, State]) ->
[
{epoch, State#state.epoch},
{user, State#state.user},
diff --git a/src/couch_replicator/src/couch_replicator_httpc_pool.erl b/src/couch_replicator/src/couch_replicator_httpc_pool.erl
index fb15dcea1..55d03a1b1 100644
--- a/src/couch_replicator/src/couch_replicator_httpc_pool.erl
+++ b/src/couch_replicator/src/couch_replicator_httpc_pool.erl
@@ -19,7 +19,7 @@
% gen_server API
-export([init/1, handle_call/3, handle_info/2, handle_cast/2]).
--export([format_status/2]).
+-export([format_status/1]).
-include_lib("couch/include/couch_db.hrl").
@@ -135,7 +135,7 @@ handle_info({'DOWN', Ref, process, _, _}, #state{callers = Callers} = State) ->
{noreply, State}
end.
-format_status(_Opt, [_PDict, State]) ->
+format_status([_PDict, State]) ->
#state{
url = Url,
proxy_url = ProxyUrl
diff --git a/src/couch_replicator/src/couch_replicator_scheduler.erl b/src/couch_replicator/src/couch_replicator_scheduler.erl
index 379a42b38..0af64e291 100644
--- a/src/couch_replicator/src/couch_replicator_scheduler.erl
+++ b/src/couch_replicator/src/couch_replicator_scheduler.erl
@@ -25,7 +25,7 @@
handle_call/3,
handle_info/2,
handle_cast/2,
- format_status/2
+ format_status/1
]).
-export([
@@ -357,7 +357,7 @@ terminate(_Reason, _State) ->
couch_replicator_share:clear(),
ok.
-format_status(_Opt, [_PDict, State]) ->
+format_status([_PDict, State]) ->
[
{max_jobs, State#state.max_jobs},
{running_jobs, running_job_count()},
diff --git a/src/couch_replicator/src/couch_replicator_scheduler_job.erl b/src/couch_replicator/src/couch_replicator_scheduler_job.erl
index 7f123441f..623dcede4 100644
--- a/src/couch_replicator/src/couch_replicator_scheduler_job.erl
+++ b/src/couch_replicator/src/couch_replicator_scheduler_job.erl
@@ -25,7 +25,7 @@
handle_call/3,
handle_info/2,
handle_cast/2,
- format_status/2,
+ format_status/1,
sum_stats/2,
report_seq_done/3
]).
@@ -477,7 +477,7 @@ terminate_cleanup(#rep_state{rep_details = #rep{id = RepId}} = State) ->
couch_replicator_api_wrap:db_close(State#rep_state.source),
couch_replicator_api_wrap:db_close(State#rep_state.target).
-format_status(_Opt, [_PDict, State]) ->
+format_status([_PDict, State]) ->
#rep_state{
source = Source,
target = Target,
diff --git a/src/couch_replicator/src/couch_replicator_worker.erl b/src/couch_replicator/src/couch_replicator_worker.erl
index 078e6e7e0..ea01a3e00 100644
--- a/src/couch_replicator/src/couch_replicator_worker.erl
+++ b/src/couch_replicator/src/couch_replicator_worker.erl
@@ -19,7 +19,7 @@
% gen_server callbacks
-export([init/1]).
-export([handle_call/3, handle_cast/2, handle_info/2]).
--export([format_status/2]).
+-export([format_status/1]).
-include_lib("couch/include/couch_db.hrl").
-include_lib("couch_replicator/include/couch_replicator_api_wrap.hrl").
@@ -242,7 +242,7 @@ handle_info({'EXIT', _Pid, {doc_write_failed, _} = Err}, State) ->
handle_info({'EXIT', Pid, Reason}, State) ->
{stop, {process_died, Pid, Reason}, State}.
-format_status(_Opt, [_PDict, State]) ->
+format_status([_PDict, State]) ->
#state{
cp = MainJobPid,
loop = LoopPid,