File 0795-fix-gen_server-reply-2-and-fix-dialyzer-unmatched-wa.patch of Package erlang

From eb9479da430a0295dbe09ba91de683cd04a8bc1f Mon Sep 17 00:00:00 2001
From: Pouriya Jahanbakhsh <p.jahanbakhsh@sgas.ir>
Date: Tue, 8 Oct 2019 18:34:10 +0330
Subject: [PATCH] fix: gen_server:reply/2 and fix: dialyzer unmatched warning
 in global.erl

---
 lib/kernel/src/global.erl         | 2 +-
 lib/stdlib/doc/src/gen_server.xml | 5 +----
 lib/stdlib/src/gen_server.erl     | 3 ++-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/kernel/src/global.erl b/lib/kernel/src/global.erl
index 3875074d74..ff6674cd08 100644
--- a/lib/kernel/src/global.erl
+++ b/lib/kernel/src/global.erl
@@ -909,7 +909,7 @@ handle_info({nodeup, Node}, S0) when S0#state.connect_all ->
     end;
 
 handle_info({whereis, Name, From}, S) ->
-    do_whereis(Name, From),
+    _ = do_whereis(Name, From),
     {noreply, S};
 
 handle_info(known, S) ->
diff --git a/lib/stdlib/doc/src/gen_server.xml b/lib/stdlib/doc/src/gen_server.xml
index a4554d7657..4ff911fc96 100644
--- a/lib/stdlib/doc/src/gen_server.xml
+++ b/lib/stdlib/doc/src/gen_server.xml
@@ -307,12 +307,11 @@ gen_server:abcast     -----> Module:handle_cast/2
     </func>
 
     <func>
-      <name>reply(Client, Reply) -> Result</name>
+      <name>reply(Client, Reply) -> ok</name>
       <fsummary>Send a reply to a client.</fsummary>
       <type>
         <v>Client - see below</v>
         <v>Reply = term()</v>
-        <v>Result = term()</v>
       </type>
       <desc>
         <p>This function can be used by a <c>gen_server</c> process to
@@ -326,8 +325,6 @@ gen_server:abcast     -----> Module:handle_cast/2
           the callback function. <c>Reply</c> is any term
           given back to the client as the return value of
           <c>call/2,3</c> or <c>multi_call/2,3,4</c>.</p>
-        <p>The return value <c>Result</c> is not further defined, and
-          is always to be ignored.</p>
       </desc>
     </func>
 
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl
index c7b6406f54..974aeb6032 100644
--- a/lib/stdlib/src/gen_server.erl
+++ b/lib/stdlib/src/gen_server.erl
@@ -249,7 +249,8 @@ cast_msg(Request) -> {'$gen_cast',Request}.
 %% Send a reply to the client.
 %% -----------------------------------------------------------------
 reply({To, Tag}, Reply) ->
-    catch To ! {Tag, Reply}.
+    catch To ! {Tag, Reply},
+    ok.
 
 %% ----------------------------------------------------------------- 
 %% Asynchronous broadcast, returns nothing, it's just send 'n' pray
-- 
2.16.4

openSUSE Build Service is sponsored by