Fix some dialyzer warnings

Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/8cab28a7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/8cab28a7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/8cab28a7

Branch: refs/heads/master
Commit: 8cab28a70b3455f481eae61a8a51501d6796996d
Parents: e9c9bb4
Author: ILYA Khlopotov <iil...@ca.ibm.com>
Authored: Wed Jun 22 10:30:19 2016 -0700
Committer: ILYA Khlopotov <iil...@ca.ibm.com>
Committed: Wed Jun 22 10:30:19 2016 -0700

----------------------------------------------------------------------
 src/couch_proc_manager.erl | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/8cab28a7/src/couch_proc_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_proc_manager.erl b/src/couch_proc_manager.erl
index a6c9746..0dad679 100644
--- a/src/couch_proc_manager.erl
+++ b/src/couch_proc_manager.erl
@@ -52,12 +52,15 @@
     soft_limit
 }).
 
+-type docid() :: iodata().
+-type revision() :: {integer(), binary()}.
+
 -record(client, {
-    timestamp,
-    from,
-    lang,
-    ddoc,
-    ddoc_key
+    timestamp :: os:timestamp() | '_',
+    from :: undefined | {pid(), reference()}  | '_',
+    lang :: binary() | '_',
+    ddoc :: #doc{} | '_',
+    ddoc_key :: undefined | {DDocId :: docid(), Rev :: revision()} | '_'
 }).
 
 -record(proc_int, {
@@ -519,7 +522,7 @@ flush_waiters(State, Lang) ->
 add_waiting_client(Client) ->
     ets:insert(?WAITERS, Client#client{timestamp=os:timestamp()}).
 
-
+-spec get_waiting_client(Lang :: binary()) -> undefined | #client{}.
 get_waiting_client(Lang) ->
     case ets:match_object(?WAITERS, #client{lang=Lang, _='_'}, 1) of
         '$end_of_table' ->

Reply via email to