janl closed pull request #1190: Fix dialyzer warning for 
couch_att:from_disk_term
URL: https://github.com/apache/couchdb/pull/1190
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/couch/src/couch_att.erl b/src/couch/src/couch_att.erl
index d699b6a8fc..16edd66cea 100644
--- a/src/couch/src/couch_att.erl
+++ b/src/couch/src/couch_att.erl
@@ -152,9 +152,31 @@
     data_prop() | encoding_prop()
 ].
 
+-type disk_att_v1() :: {
+    Name :: binary(),
+    Type :: binary(),
+    Sp :: any(),
+    AttLen :: non_neg_integer(),
+    RevPos :: non_neg_integer(),
+    Md5 :: binary()
+}.
+
+-type disk_att_v2() :: {
+    Name :: binary(),
+    Type :: binary(),
+    Sp :: any(),
+    AttLen :: non_neg_integer(),
+    DiskLen :: non_neg_integer(),
+    RevPos :: non_neg_integer(),
+    Md5 :: binary(),
+    Enc :: identity | gzip
+}.
+
+-type disk_att_v3() :: {Base :: tuple(), Extended :: list()}.
 
--type att() :: #att{} | attachment().
+-type disk_att() :: disk_att_v1() | disk_att_v2() | disk_att_v3().
 
+-type att() :: #att{} | attachment() | disk_att().
 
 new() ->
     %% We construct a record by default for compatability. This will be


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to