Suppress unused variable and type compiler warnings
authorJay Doane <jay.s.doane@gmail.com>
Thu, 13 Dec 2018 03:08:09 +0000 (19:08 -0800)
committerJay Doane <jay.s.doane@gmail.com>
Thu, 27 Dec 2018 21:07:57 +0000 (13:07 -0800)
src/chttpd/src/chttpd_sup.erl
src/couch/src/couch_db.erl
src/couch/src/couch_debug.erl
src/couch/test/couchdb_mrview_tests.erl
src/couch_epi/src/couch_epi.erl
src/couch_replicator/test/couch_replicator_compact_tests.erl
src/couch_tests/test/couch_tests_app_tests.erl
src/mem3/src/mem3_rep.erl
src/mem3/src/mem3_sync_event_listener.erl

index 369248e..d4bdb11 100644 (file)
@@ -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(
index 0ae164d..1f8bc42 100644 (file)
@@ -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
index 96c7a50..9506a80 100644 (file)
@@ -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
index 2549528..1c96a0a 100644 (file)
@@ -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),
index 2ce4592..0e5c233 100644 (file)
@@ -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()}
index 89e9295..7cc530c 100644 (file)
@@ -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, $/>>;
index 1acdec7..6f9c7e4 100644 (file)
@@ -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).
 
index 340bc0e..a306301 100644 (file)
@@ -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];
index cd671e4..56ffe3d 100644 (file)
@@ -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),