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 2023/01/05 10:37:59 UTC

[couchdb] branch fix/xref-bugs created (now 99f4c8ed4)

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

jan pushed a change to branch fix/xref-bugs
in repository https://gitbox.apache.org/repos/asf/couchdb.git


      at 99f4c8ed4 fix: undefined function warning

This branch includes the following new commits:

     new 99f4c8ed4 fix: undefined function warning

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: fix: undefined function warning

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

jan pushed a commit to branch fix/xref-bugs
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 99f4c8ed43c0241ea034a44b76345d17ddba78da
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Thu Jan 5 11:36:17 2023 +0100

    fix: undefined function warning
---
 src/weatherreport/src/weatherreport_check_ioq.erl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/weatherreport/src/weatherreport_check_ioq.erl b/src/weatherreport/src/weatherreport_check_ioq.erl
index a0e0b0e60..2a20b78ad 100644
--- a/src/weatherreport/src/weatherreport_check_ioq.erl
+++ b/src/weatherreport/src/weatherreport_check_ioq.erl
@@ -85,7 +85,14 @@ check(Opts) ->
     end.
 
 -spec check_legacy(list()) -> [{atom(), term()}].
-check_legacy(_Opts) ->
+check_legacy(Opts) ->
+    case erlang:function_exported(ioq, get_disk_queues, 0) of
+        true -> check_legacy_int(Opts);
+        false -> [{warning, {ioq_requests_unknown, undef}}]
+    end.
+
+-spec check_legacy_int(list()) -> [{atom(), term()}].
+check_legacy_int(_Opts) ->
     case ioq:get_disk_queues() of
         Queues when is_list(Queues) ->
             Total = sum_queues(Queues, 0),