diff options
author | Anders Svensson <[email protected]> | 2016-03-07 22:35:46 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2016-03-07 22:47:21 +0100 |
commit | 6b2aa68d78b43449598a82ef488343f7b9fe07ea (patch) | |
tree | fbac783e514f3e4853f5035029767e63d1b16fd1 /lib/diameter/src/base | |
parent | 05cef5e3a267b3515acb834130675e0cbf69bf78 (diff) | |
download | otp-6b2aa68d78b43449598a82ef488343f7b9fe07ea.tar.gz otp-6b2aa68d78b43449598a82ef488343f7b9fe07ea.tar.bz2 otp-6b2aa68d78b43449598a82ef488343f7b9fe07ea.zip |
Fix dialyzer warnings
Whether making record declarations unreadable to compensate for
dialyzer's ignorance of match specs is worth it is truly debatable.
Diffstat (limited to 'lib/diameter/src/base')
-rw-r--r-- | lib/diameter/src/base/diameter_service.erl | 19 | ||||
-rw-r--r-- | lib/diameter/src/base/diameter_traffic.erl | 4 |
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index d83ed9e56b..cc4bb60ef7 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2015. All Rights Reserved. +%% Copyright Ericsson AB 2010-2016. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -136,16 +136,16 @@ peer = false :: match(boolean() | pid())}). %% true at accepted, pid() at okay/reopen -%% Record representing an Peer State Machine processes implemented by +%% Record representing a Peer State Machine processes implemented by %% diameter_peer_fsm. -record(peer, - {pid :: pid(), - apps :: [{0..16#FFFFFFFF, diameter:app_alias()}] %% {Id, Alias} - | [diameter:app_alias()], %% remote - caps :: #diameter_caps{}, + {pid :: pid(), + apps :: match([{0..16#FFFFFFFF, diameter:app_alias()}] %% {Id, Alias} + | [diameter:app_alias()]), %% remote + caps :: match(#diameter_caps{}), started = now(), %% at process start or sharing - watchdog :: pid() %% key into watchdogT - | undefined}). %% undefined if remote + watchdog :: match(pid() %% key into watchdogT + | undefined)}). %% undefined if remote %% --------------------------------------------------------------------------- %% # start/1 @@ -579,8 +579,7 @@ init_peers({PeerT, _, _} = T, F) PeerT); %% Populate #peer{} table given a shared peers dict. -init_peers({PeerT, _, _}, SDict) - when is_integer(SDict) -> +init_peers({PeerT, _, _}, SDict) -> dict:fold(fun(P, As, N) -> ets:update_element(PeerT, P, {#peer.apps, As}), N+1 diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl index 004c1e80d5..401e7908b2 100644 --- a/lib/diameter/src/base/diameter_traffic.erl +++ b/lib/diameter/src/base/diameter_traffic.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2013-2015. All Rights Reserved. +%% Copyright Ericsson AB 2013-2016. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -1574,6 +1574,8 @@ answer(Pkt, Req) -> a(Pkt, SvcName, ModX, AE, Req). +-spec a(_, _, _) -> no_return(). %% silence dialyzer + a(#diameter_packet{errors = Es} = Pkt, SvcName, |