From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp60.i.mail.ru (smtp60.i.mail.ru [217.69.128.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7192D469719 for ; Wed, 14 Oct 2020 19:35:52 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Wed, 14 Oct 2020 19:35:43 +0300 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v1 1/4] build: fix Werror warning in src/box/txn.c List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org Found on GCC 4.8.5 on CentOS 7 issue: build/usr/src/debug/tarantool-2.6.0.144/src/box/txn.c:944:30: error: ‘limbo_entry’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (txn_limbo_wait_complete(&txn_limbo, limbo_entry) < 0) Set limbo_entry variable to NULL on initialization. Needed for #4941 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4941-gcc-old Issue: https://github.com/tarantool/tarantool/issues/4941 src/box/txn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/box/txn.c b/src/box/txn.c index 4f5484ec5..eb725aaa9 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -886,7 +886,7 @@ int txn_commit(struct txn *txn) { struct journal_entry *req; - struct txn_limbo_entry *limbo_entry; + struct txn_limbo_entry *limbo_entry = NULL; txn->fiber = fiber(); -- 2.25.1