aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-03-10 13:10:34 +0100
committerErlang/OTP <[email protected]>2016-03-10 13:10:34 +0100
commitb612d83194ec1b88772f0d6c69600da2e4b918cf (patch)
treeb54b8de3a905a9b454dcdbd798cfb243e0c5f8a5 /lib/diameter/src/base
parent8d427543af1f8b88dbece2e7f131f7b26f2f3bba (diff)
parent6b2aa68d78b43449598a82ef488343f7b9fe07ea (diff)
downloadotp-b612d83194ec1b88772f0d6c69600da2e4b918cf.tar.gz
otp-b612d83194ec1b88772f0d6c69600da2e4b918cf.tar.bz2
otp-b612d83194ec1b88772f0d6c69600da2e4b918cf.zip
Merge branch 'anders/diameter/dialyzer/OTP-13400' into maint-17
* anders/diameter/dialyzer/OTP-13400: Fix dialyzer warnings
Diffstat (limited to 'lib/diameter/src/base')
-rw-r--r--lib/diameter/src/base/diameter_service.erl17
-rw-r--r--lib/diameter/src/base/diameter_traffic.erl2
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 465f74a1fc..7aa7c422c4 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -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
@@ -582,8 +582,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 5bfbadb436..5d39c08213 100644
--- a/lib/diameter/src/base/diameter_traffic.erl
+++ b/lib/diameter/src/base/diameter_traffic.erl
@@ -1573,6 +1573,8 @@ answer(Pkt,
Req) ->
a(Pkt, SvcName, ModX, AE, Req).
+-spec a(_, _, _) -> no_return(). %% silence dialyzer
+
a(#diameter_packet{errors = Es}
= Pkt,
SvcName,