You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2021/10/11 19:35:49 UTC

[couchdb] branch eliminate-compiler-warnings created (now 303fbbb)

This is an automated email from the ASF dual-hosted git repository.

jaydoane pushed a change to branch eliminate-compiler-warnings
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 303fbbb  Eliminate compiler warnings

This branch includes the following new commits:

     new 303fbbb  Eliminate compiler warnings

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: Eliminate compiler warnings

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jaydoane pushed a commit to branch eliminate-compiler-warnings
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 303fbbbce30d6c2487235c654c2eb6154baefe79
Author: Jay Doane <ja...@apache.org>
AuthorDate: Mon Oct 11 10:48:34 2021 -0700

    Eliminate compiler warnings
    
    - Replace unused variable with underscore
    - Add nowarn_export_all compiler option
    - Use STACKTRACE macro
---
 src/chttpd/src/chttpd_node.erl                   | 2 +-
 src/couch_pse_tests/src/cpse_test_purge_seqs.erl | 1 +
 src/smoosh/src/smoosh_server.erl                 | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/chttpd/src/chttpd_node.erl b/src/chttpd/src/chttpd_node.erl
index feabcb9..f60b3f7 100644
--- a/src/chttpd/src/chttpd_node.erl
+++ b/src/chttpd/src/chttpd_node.erl
@@ -32,7 +32,7 @@ handle_node_req(#httpd{path_parts=[_, <<"_local">>]}=Req) ->
 handle_node_req(#httpd{path_parts=[A, <<"_local">>|Rest]}=Req) ->
     handle_node_req(Req#httpd{path_parts=[A, node()] ++ Rest});
 % GET /_node/$node/_versions
-handle_node_req(#httpd{method='GET', path_parts=[_, Node, <<"_versions">>]}=Req) ->
+handle_node_req(#httpd{method='GET', path_parts=[_, _, <<"_versions">>]}=Req) ->
     send_json(Req, 200, {[
         {erlang_version, ?l2b(?COUCHDB_ERLANG_VERSION)},
         {javascript_engine, {[
diff --git a/src/couch_pse_tests/src/cpse_test_purge_seqs.erl b/src/couch_pse_tests/src/cpse_test_purge_seqs.erl
index c896b61..6a54658 100644
--- a/src/couch_pse_tests/src/cpse_test_purge_seqs.erl
+++ b/src/couch_pse_tests/src/cpse_test_purge_seqs.erl
@@ -12,6 +12,7 @@
 
 -module(cpse_test_purge_seqs).
 -compile(export_all).
+-compile(nowarn_export_all).
 
 
 -include_lib("eunit/include/eunit.hrl").
diff --git a/src/smoosh/src/smoosh_server.erl b/src/smoosh/src/smoosh_server.erl
index f088c54..6aab191 100644
--- a/src/smoosh/src/smoosh_server.erl
+++ b/src/smoosh/src/smoosh_server.erl
@@ -247,8 +247,8 @@ enqueue_request(State, Object) ->
         {ok, Pid, Priority} ->
             smoosh_channel:enqueue(Pid, Object, Priority)
         end
-    catch Class:Exception ->
-        Stack = erlang:get_stacktrace(),
+    catch
+        ?STACKTRACE(Class, Exception, Stack)
         couch_log:notice("~s: ~p ~p for ~s : ~p",
             [?MODULE, Class, Exception,
                 smoosh_utils:stringify(Object), Stack])