aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-07-24 18:03:19 +0200
committerMicael Karlberg <[email protected]>2019-07-24 18:03:19 +0200
commitae6eb243f95d4fb1bdc83d31613a36c53323b9ee (patch)
tree326655c72379aabd0d065665d9ac07a119551af1 /erts
parent8758de0e10f764e8eb43ee22ddaaabe46fa963de (diff)
downloadotp-ae6eb243f95d4fb1bdc83d31613a36c53323b9ee.tar.gz
otp-ae6eb243f95d4fb1bdc83d31613a36c53323b9ee.tar.bz2
otp-ae6eb243f95d4fb1bdc83d31613a36c53323b9ee.zip
[esock] Dialyzer related cleanup
Removed unnecessary spec's causing dialyzer warnings.
Diffstat (limited to 'erts')
-rw-r--r--erts/preloaded/ebin/socket.beambin76124 -> 76028 bytes
-rw-r--r--erts/preloaded/src/Makefile10
-rw-r--r--erts/preloaded/src/socket.erl10
3 files changed, 15 insertions, 5 deletions
diff --git a/erts/preloaded/ebin/socket.beam b/erts/preloaded/ebin/socket.beam
index 095a795a9c..eafd7a97b2 100644
--- a/erts/preloaded/ebin/socket.beam
+++ b/erts/preloaded/ebin/socket.beam
Binary files differ
diff --git a/erts/preloaded/src/Makefile b/erts/preloaded/src/Makefile
index e1bb2ee5c4..38b85915cc 100644
--- a/erts/preloaded/src/Makefile
+++ b/erts/preloaded/src/Makefile
@@ -95,6 +95,15 @@ ERL_COMPILE_FLAGS += +debug_info -I$(KERNEL_SRC) -I$(KERNEL_INCLUDE)
DIA_PLT = erts-preloaded.plt
DIA_ANALYSIS = $(basename $(DIA_PLT)).dialyzer_analysis
+ifeq ($(DIAW_EH),true)
+DIA_WARNINGS += -Werror_handling
+endif
+ifeq ($(DIAW_US),true)
+DIA_WARNINGS += -Wunderspecs
+endif
+ifeq ($(DIAW_UR),true)
+DIA_WARNINGS += -Wunmatched_returns
+endif
debug opt: $(TARGET_FILES)
@@ -144,6 +153,7 @@ dialyzer: $(DIA_PLT)
@echo "Running dialyzer on $(basename $(DIA_PLT))"
@dialyzer --plt $< \
../ebin \
+ $(DIA_WARNINGS) \
--verbose
#
diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl
index 57b9f54a4e..e01c85d5d1 100644
--- a/erts/preloaded/src/socket.erl
+++ b/erts/preloaded/src/socket.erl
@@ -2696,17 +2696,17 @@ cancel(#socket{ref = SockRef}, #select_info{tag = Tag, ref = Ref}) ->
%%
%% ===========================================================================
--spec enc_domain(Domain) -> non_neg_integer() when
- Domain :: domain().
+%% -spec enc_domain(Domain) -> non_neg_integer() when
+%% Domain :: domain().
enc_domain(local) -> ?SOCKET_DOMAIN_LOCAL;
enc_domain(inet) -> ?SOCKET_DOMAIN_INET;
enc_domain(inet6) -> ?SOCKET_DOMAIN_INET6;
enc_domain(Domain) -> invalid_domain(Domain).
--spec enc_type(Domain, Type) -> non_neg_integer() when
- Domain :: domain(),
- Type :: type().
+%% -spec enc_type(Domain, Type) -> non_neg_integer() when
+%% Domain :: domain(),
+%% Type :: type().
%% What combos are valid?
enc_type(_, stream) -> ?SOCKET_TYPE_STREAM;