From 5fa07312d27a7ff6826bf943e3b9d6575be3acf1 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Fri, 29 Apr 2016 10:29:21 +0200 Subject: ssh: remove dialyzer 'no-local-return' warnings --- lib/ssh/src/ssh_no_io.erl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/ssh') diff --git a/lib/ssh/src/ssh_no_io.erl b/lib/ssh/src/ssh_no_io.erl index 2358560a26..1da257ed99 100644 --- a/lib/ssh/src/ssh_no_io.erl +++ b/lib/ssh/src/ssh_no_io.erl @@ -27,24 +27,36 @@ -export([yes_no/2, read_password/2, read_line/2, format/2]). + +-spec yes_no(any(), any()) -> no_return(). + yes_no(_, _) -> ssh_connection_handler:disconnect( #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE, description = "User interaction is not allowed"}, {no_io_allowed, yes_no}). + +-spec read_password(any(), any()) -> no_return(). + read_password(_, _) -> ssh_connection_handler:disconnect( #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE, description = "User interaction is not allowed"}, {no_io_allowed, read_password}). + +-spec read_line(any(), any()) -> no_return(). + read_line(_, _) -> ssh_connection_handler:disconnect( #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE, description = "User interaction is not allowed"}, {no_io_allowed, read_line}). + +-spec format(any(), any()) -> no_return(). + format(_, _) -> ssh_connection_handler:disconnect( #ssh_msg_disconnect{code = ?SSH_DISCONNECT_SERVICE_NOT_AVAILABLE, -- cgit v1.2.3