Skip to content

Commit

Permalink
Remove dialyzer attributes for OTP 17 compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmj committed Oct 28, 2016
1 parent e5735df commit aad137a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions src/hex_pb_package.erl
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ verify_msg(Msg, MsgName) ->
end.


-dialyzer({nowarn_function,v_msg_Dependency/2}).
v_msg_Dependency(#{package := F1, requirement := F2} =
M,
Path) ->
Expand All @@ -582,7 +581,6 @@ v_msg_Dependency(M, Path) when is_map(M) ->
v_msg_Dependency(X, Path) ->
mk_type_error({expected_msg, 'Dependency'}, X, Path).

-dialyzer({nowarn_function,v_msg_Release/2}).
v_msg_Release(#{version := F1, checksum := F2,
dependencies := F3},
Path) ->
Expand All @@ -605,7 +603,6 @@ v_msg_Release(M, Path) when is_map(M) ->
v_msg_Release(X, Path) ->
mk_type_error({expected_msg, 'Release'}, X, Path).

-dialyzer({nowarn_function,v_msg_Package/2}).
v_msg_Package(#{releases := F1}, Path) ->
if is_list(F1) ->
_ = [v_msg_Release(Elem, [releases | Path])
Expand All @@ -623,13 +620,11 @@ v_msg_Package(M, Path) when is_map(M) ->
v_msg_Package(X, Path) ->
mk_type_error({expected_msg, 'Package'}, X, Path).

-dialyzer({nowarn_function,v_type_bool/2}).
v_type_bool(false, _Path) -> ok;
v_type_bool(true, _Path) -> ok;
v_type_bool(X, Path) ->
mk_type_error(bad_boolean_value, X, Path).

-dialyzer({nowarn_function,v_type_string/2}).
v_type_string(S, Path) when is_list(S); is_binary(S) ->
try unicode:characters_to_binary(S) of
B when is_binary(B) -> ok;
Expand All @@ -642,7 +637,6 @@ v_type_string(S, Path) when is_list(S); is_binary(S) ->
v_type_string(X, Path) ->
mk_type_error(bad_unicode_string, X, Path).

-dialyzer({nowarn_function,v_type_bytes/2}).
v_type_bytes(B, _Path) when is_binary(B) -> ok;
v_type_bytes(X, Path) ->
mk_type_error(bad_binary_value, X, Path).
Expand Down
2 changes: 0 additions & 2 deletions src/hex_pb_signed.erl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ verify_msg(Msg, MsgName) ->
end.


-dialyzer({nowarn_function,v_msg_Signed/2}).
v_msg_Signed(#{payload := F1} = M, Path) ->
v_type_bytes(F1, [payload | Path]),
case M of
Expand All @@ -206,7 +205,6 @@ v_msg_Signed(M, Path) when is_map(M) ->
v_msg_Signed(X, Path) ->
mk_type_error({expected_msg, 'Signed'}, X, Path).

-dialyzer({nowarn_function,v_type_bytes/2}).
v_type_bytes(B, _Path) when is_binary(B) -> ok;
v_type_bytes(X, Path) ->
mk_type_error(bad_binary_value, X, Path).
Expand Down

0 comments on commit aad137a

Please sign in to comment.