From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Kirill Yukhin <kyukhin@tarantool.org>
Cc: "Alexander V. Tikhonov" <avtikhon@tarantool.org>,
tarantool-patches@freelists.org
Subject: [tarantool-patches] [PATCH v1] LTO build fails on warning message
Date: Thu, 25 Jul 2019 17:44:47 +0300 [thread overview]
Message-ID: <d153f8e262c20ce18a9b99c59a77dbf894a88f13.1564065765.git.avtikhon@tarantool.org> (raw)
The uninitialized variable found that caused the fail on build,
due to LTO builds with flag to check warnings as errors. Set the
variable to 0 initial value. The found issue was:
[100%] Built target xrow.test
src/box/sql/vdbe.c: In function ‘sqlVdbeExec’:
src/box/sql/vdbe.c:3691:11: error: ‘id’ may be used uninitialized
in this function [-Werror=maybe-uninitialized]
uint64_t id;
^
lto1: all warnings being treated as errors
lto-wrapper: fatal error: /usr/bin/c++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Closes #4378
---
Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4378-lto-fix-vdbe
Issue: https://github.com/tarantool/tarantool/issues/4378
src/box/sql/vdbe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
index c0948693c..576597d52 100644
--- a/src/box/sql/vdbe.c
+++ b/src/box/sql/vdbe.c
@@ -3661,7 +3661,7 @@ case OP_Sequence: { /* out2 */
*/
case OP_NextSequenceId: {
pOut = &aMem[pOp->p2];
- uint64_t id;
+ uint64_t id = 0;
tarantoolSqlNextSeqId(&id);
id++;
mem_set_u64(pOut, id);
--
2.17.1
next reply other threads:[~2019-07-25 14:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 14:44 Alexander V. Tikhonov [this message]
2019-07-26 17:53 ` [tarantool-patches] " Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d153f8e262c20ce18a9b99c59a77dbf894a88f13.1564065765.git.avtikhon@tarantool.org \
--to=avtikhon@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] [PATCH v1] LTO build fails on warning message' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox