aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2016-03-09 08:26:32 +0100
committerAnders Svensson <[email protected]>2016-03-09 08:26:32 +0100
commitaafb2506a85b1bad11157f9786f2a834c9d76fae (patch)
tree158472097b11af31dc7c5482f753aefd4af31306 /lib/diameter/src
parente4fd76bdd9dd15547531947aaecf487385a6d796 (diff)
parent073d4a8a08b1cfad7720511b10819ec2db76aeb7 (diff)
downloadotp-aafb2506a85b1bad11157f9786f2a834c9d76fae.tar.gz
otp-aafb2506a85b1bad11157f9786f2a834c9d76fae.tar.bz2
otp-aafb2506a85b1bad11157f9786f2a834c9d76fae.zip
Merge branch 'anders/diameter/18/dialyzer/OTP-13400' into maint
* anders/diameter/18/dialyzer/OTP-13400: Fix dialyzer warnings
Diffstat (limited to 'lib/diameter/src')
-rw-r--r--lib/diameter/src/base/diameter_service.erl19
-rw-r--r--lib/diameter/src/base/diameter_traffic.erl2
2 files changed, 11 insertions, 10 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 66c4a7582f..87ef2e522d 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -137,16 +137,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{},
- started = diameter_lib:now(), %% at process start or sharing
- watchdog :: pid() %% key into watchdogT
- | undefined}). %% undefined if remote
+ {pid :: pid(),
+ apps :: match([{0..16#FFFFFFFF, diameter:app_alias()}] %% {Id, Alias}
+ | [diameter:app_alias()]), %% remote
+ caps :: match(#diameter_caps{}),
+ started = diameter_lib:now(), %% at process start or sharing
+ watchdog :: match(pid() %% key into watchdogT
+ | undefined)}). %% undefined if remote
%% ---------------------------------------------------------------------------
%% # start/1
@@ -583,8 +583,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 516353219a..c169d3fc2c 100644
--- a/lib/diameter/src/base/diameter_traffic.erl
+++ b/lib/diameter/src/base/diameter_traffic.erl
@@ -1565,6 +1565,8 @@ answer(Pkt,
Req) ->
a(Pkt, SvcName, ModX, AE, Req).
+-spec a(_, _, _) -> no_return(). %% silence dialyzer
+
a(#diameter_packet{errors = Es}
= Pkt,
SvcName,