File 2217-Suppress-false-positive-warning-in-gcc-4.8.2.patch of Package erlang

From 6f01f562418c26e37233c2f1ca1dc62c53418ca8 Mon Sep 17 00:00:00 2001
From: Kjell Winblad <kjellwinblad@gmail.com>
Date: Thu, 21 Mar 2019 13:10:05 +0100
Subject: [PATCH 3/3] Suppress false positive warning in gcc 4.8.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This commit suppresses the following warning in gcc 4.8.2:

In file included from beam/bif.c:33:0:
beam/bif.c: In function ‘iolist_size_1’:
beam/bif.h:332:14: warning: ‘state_mref’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       reg[0] = (A0);      \
              ^
beam/bif.c:2464:11: note: ‘state_mref’ was declared here
     Eterm state_mref;
---
 erts/emulator/beam/bif.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index c102ddbee6..919dc9c4f0 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -2463,6 +2463,7 @@ BIF_RETTYPE iolist_size_1(BIF_ALIST_1)
     ErtsIOListSizeContext* context = NULL;
     Eterm state_mref;
     int is_trap_at_L_iter_list;
+    ERTS_UNDEF(state_mref, THE_NON_VALUE);
     ESTACK_CHANGE_ALLOCATOR(s, ERTS_ALC_T_SAVED_ESTACK);
 #ifdef DEBUG
     iterations_until_trap = iterations_until_trap / 10;
-- 
2.16.4

openSUSE Build Service is sponsored by