Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1 1/4] build: fix Werror warning in src/box/txn.c
@ 2020-10-14 16:35 Alexander V. Tikhonov
  2020-10-14 16:35 ` [Tarantool-patches] [PATCH v1 2/4] build: fix Werror warning in test/unit:fiber*.c* Alexander V. Tikhonov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexander V. Tikhonov @ 2020-10-14 16:35 UTC (permalink / raw)
  To: Kirill Yukhin; +Cc: tarantool-patches

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-15  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 16:35 [Tarantool-patches] [PATCH v1 1/4] build: fix Werror warning in src/box/txn.c Alexander V. Tikhonov
2020-10-14 16:35 ` [Tarantool-patches] [PATCH v1 2/4] build: fix Werror warning in test/unit:fiber*.c* Alexander V. Tikhonov
2020-10-14 16:35 ` [Tarantool-patches] [PATCH v1 3/4] build: add Werror flag to CentOS7 packages build Alexander V. Tikhonov
2020-10-14 16:35 ` [Tarantool-patches] [PATCH v1 4/4] gitlab-ci: test default gcc on CentOS 7 Alexander V. Tikhonov
2020-10-15  8:53 ` [Tarantool-patches] [PATCH v1 1/4] build: fix Werror warning in src/box/txn.c Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox