File 0820-eunit-Remove-compiler-warnings.patch of Package erlang

From 90c3b016bb0e95e2112b4b55fad4a396c53068be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?= <peterdmv@erlang.org>
Date: Tue, 26 Nov 2019 10:43:46 +0100
Subject: [PATCH] eunit: Remove compiler warnings

---
 lib/eunit/src/eunit_test.erl | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/eunit/src/eunit_test.erl b/lib/eunit/src/eunit_test.erl
index 6fe85ae70a..52fd8a4b91 100644
--- a/lib/eunit/src/eunit_test.erl
+++ b/lib/eunit/src/eunit_test.erl
@@ -164,7 +164,7 @@ macro_test_() ->
  		 {ok, ok} = run_testfun(F)
  	     end),
       ?_test(begin
- 		 {?LINE, F} = ?_assertEqual(3, 1+1),
+ 		 {?LINE, F} = ?_assertEqual(id(3), id(1+1)),
  		 {error,{error,{assertEqual_failed,
 				[{module,_},
 				 {line,_},
@@ -175,7 +175,7 @@ macro_test_() ->
 		     = run_testfun(F)
  	     end),
       ?_test(begin
-		 {?LINE, F} = ?_assertNotEqual(1, 0),
+		 {?LINE, F} = ?_assertNotEqual(id(1), id(0)),
 		 {ok, ok} = run_testfun(F)
 	     end),
       ?_test(begin
@@ -402,4 +402,7 @@ multi_setup([{Tag, S} | Es], CleanupPrev) ->
 multi_setup([], CleanupAll) ->
     {fun (Rs) -> Rs end, CleanupAll}.
 
+id(I) ->
+    I.
+
 ok(_) -> ok.
-- 
2.16.4

openSUSE Build Service is sponsored by