summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Doane <jay.s.doane@gmail.com>2018-12-12 19:08:09 -0800
committerJay Doane <jay.s.doane@gmail.com>2018-12-27 13:07:57 -0800
commitf519b26c80e2c3dce63dc2669b92f6e357607103 (patch)
treec9b10502b3a5dced685d27e34c41188022ac2814
parentcb10e48b3819153159c7e348fefd917ce066b7fe (diff)
downloadcouchdb-f519b26c80e2c3dce63dc2669b92f6e357607103.tar.gz
Suppress unused variable and type compiler warnings
-rw-r--r--src/chttpd/src/chttpd_sup.erl2
-rw-r--r--src/couch/src/couch_db.erl2
-rw-r--r--src/couch/src/couch_debug.erl2
-rw-r--r--src/couch/test/couchdb_mrview_tests.erl4
-rw-r--r--src/couch_epi/src/couch_epi.erl3
-rw-r--r--src/couch_replicator/test/couch_replicator_compact_tests.erl2
-rw-r--r--src/couch_tests/test/couch_tests_app_tests.erl2
-rw-r--r--src/mem3/src/mem3_rep.erl1
-rw-r--r--src/mem3/src/mem3_sync_event_listener.erl2
9 files changed, 8 insertions, 12 deletions
diff --git a/src/chttpd/src/chttpd_sup.erl b/src/chttpd/src/chttpd_sup.erl
index 369248ea6..d4bdb118c 100644
--- a/src/chttpd/src/chttpd_sup.erl
+++ b/src/chttpd/src/chttpd_sup.erl
@@ -88,7 +88,7 @@ lru_opts() ->
append_if_set({Key, Value}, Opts) when Value > 0 ->
[{Key, Value} | Opts];
-append_if_set({Key, 0}, Opts) ->
+append_if_set({_Key, 0}, Opts) ->
Opts;
append_if_set({Key, Value}, Opts) ->
couch_log:error(
diff --git a/src/couch/src/couch_db.erl b/src/couch/src/couch_db.erl
index 0ae164d9b..1f8bc422f 100644
--- a/src/couch/src/couch_db.erl
+++ b/src/couch/src/couch_db.erl
@@ -1767,7 +1767,7 @@ is_system_db_name(DbName) when is_binary(DbName) ->
Suffix = filename:basename(Normalized),
case {filename:dirname(Normalized), lists:member(Suffix, ?SYSTEM_DATABASES)} of
{<<".">>, Result} -> Result;
- {Prefix, false} -> false;
+ {_Prefix, false} -> false;
{Prefix, true} ->
ReOpts = [{capture,none}, dollar_endonly],
re:run(Prefix, ?DBNAME_REGEX, ReOpts) == match
diff --git a/src/couch/src/couch_debug.erl b/src/couch/src/couch_debug.erl
index 96c7a505f..9506a80ce 100644
--- a/src/couch/src/couch_debug.erl
+++ b/src/couch/src/couch_debug.erl
@@ -551,7 +551,7 @@ should_include_extra_info({InitialPid, _Processes, _Tree}) ->
?assert(lists:keymember(reductions, 1, Props)),
?assert(lists:keymember(message_queue_len, 1, Props)),
?assert(lists:keymember(memory, 1, Props));
- Port ->
+ _Port ->
ok
end,
Props
diff --git a/src/couch/test/couchdb_mrview_tests.erl b/src/couch/test/couchdb_mrview_tests.erl
index 2549528be..1c96a0ae0 100644
--- a/src/couch/test/couchdb_mrview_tests.erl
+++ b/src/couch/test/couchdb_mrview_tests.erl
@@ -151,7 +151,7 @@ should_cleanup_index_files(_PortType, {Host, DbName}) ->
".[0-9]*_design/mrview/*"
],
ReqUrl = Host ++ "/" ++ DbName ++ "/_design/foo/_view/view1",
- {ok, Status0, _Headers0, Body0} = test_request:get(ReqUrl, [?AUTH]),
+ {ok, _Status0, _Headers0, _Body0} = test_request:get(ReqUrl, [?AUTH]),
FileList0 = filelib:wildcard(IndexWildCard),
?assertNotEqual([], FileList0),
@@ -169,7 +169,7 @@ should_cleanup_index_files(_PortType, {Host, DbName}) ->
?assertEqual([], lists:usort(FileList1 -- (FileList0 ++ ToDelete))),
CleanupUrl = Host ++ "/" ++ DbName ++ "/_view_cleanup",
- {ok, Status1, _Headers1, Body1} = test_request:post(
+ {ok, _Status1, _Headers1, _Body1} = test_request:post(
CleanupUrl, [], <<>>, [?AUTH]),
test_util:wait(fun() ->
IndexFiles = filelib:wildcard(IndexWildCard),
diff --git a/src/couch_epi/src/couch_epi.erl b/src/couch_epi/src/couch_epi.erl
index 2ce4592d2..0e5c233ab 100644
--- a/src/couch_epi/src/couch_epi.erl
+++ b/src/couch_epi/src/couch_epi.erl
@@ -58,9 +58,6 @@
-type apply_opts() :: [apply_opt()].
--type data_spec_opt()
- :: {interval, pos_integer()}.
-
-type data_spec()
:: {static_module, module()}
| {callback_module, module()}
diff --git a/src/couch_replicator/test/couch_replicator_compact_tests.erl b/src/couch_replicator/test/couch_replicator_compact_tests.erl
index 89e9295d4..7cc530c19 100644
--- a/src/couch_replicator/test/couch_replicator_compact_tests.erl
+++ b/src/couch_replicator/test/couch_replicator_compact_tests.erl
@@ -97,7 +97,7 @@ should_run_replication(RepPid, RepId, Source, Target) ->
should_ensure_replication_still_running(RepPid, RepId, Source, Target) ->
?_test(check_active_tasks(RepPid, RepId, Source, Target)).
-check_active_tasks(RepPid, {BaseId, Ext} = RepId, Src, Tgt) ->
+check_active_tasks(RepPid, {BaseId, Ext} = _RepId, Src, Tgt) ->
Source = case Src of
{remote, NameSrc} ->
<<(db_url(NameSrc))/binary, $/>>;
diff --git a/src/couch_tests/test/couch_tests_app_tests.erl b/src/couch_tests/test/couch_tests_app_tests.erl
index 1acdec789..6f9c7e419 100644
--- a/src/couch_tests/test/couch_tests_app_tests.erl
+++ b/src/couch_tests/test/couch_tests_app_tests.erl
@@ -46,7 +46,7 @@ setup2(Arg1, Arg2) ->
Ctx1 = couch_tests:start_applications([public_key], Ctx0),
couch_tests:set_state(Fixture, Ctx1, {Arg1, Arg2})
end,
- fun(Fixture, Ctx) ->
+ fun(_Fixture, Ctx) ->
Ctx
end).
diff --git a/src/mem3/src/mem3_rep.erl b/src/mem3/src/mem3_rep.erl
index 340bc0e7b..a30630167 100644
--- a/src/mem3/src/mem3_rep.erl
+++ b/src/mem3/src/mem3_rep.erl
@@ -137,7 +137,6 @@ verify_purge_checkpoint(DbName, Props) ->
Target = binary_to_existing_atom(TargetBin, latin1),
try
- Shards = mem3:shards(DbName),
Nodes = lists:foldl(fun(Shard, Acc) ->
case Shard#shard.range == Range of
true -> [Shard#shard.node | Acc];
diff --git a/src/mem3/src/mem3_sync_event_listener.erl b/src/mem3/src/mem3_sync_event_listener.erl
index cd671e4d5..56ffe3d07 100644
--- a/src/mem3/src/mem3_sync_event_listener.erl
+++ b/src/mem3/src/mem3_sync_event_listener.erl
@@ -269,7 +269,7 @@ should_set_sync_frequency(Pid) ->
ok
end).
-should_restart_listener(Pid) ->
+should_restart_listener(_Pid) ->
?_test(begin
meck:reset(config_notifier),
config:set("mem3", "sync_frequency", "error", false),