* [tarantool-patches] [PATCH v1] LTO build fails on warning message
@ 2019-07-25 14:44 Alexander V. Tikhonov
2019-07-26 17:53 ` [tarantool-patches] " Kirill Yukhin
0 siblings, 1 reply; 2+ messages in thread
From: Alexander V. Tikhonov @ 2019-07-25 14:44 UTC (permalink / raw)
To: Kirill Yukhin; +Cc: Alexander V. Tikhonov, tarantool-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tarantool-patches] Re: [PATCH v1] LTO build fails on warning message
2019-07-25 14:44 [tarantool-patches] [PATCH v1] LTO build fails on warning message Alexander V. Tikhonov
@ 2019-07-26 17:53 ` Kirill Yukhin
0 siblings, 0 replies; 2+ messages in thread
From: Kirill Yukhin @ 2019-07-26 17:53 UTC (permalink / raw)
To: tarantool-patches; +Cc: Alexander V. Tikhonov
Hello,
On 25 июл 17:44, Alexander V. Tikhonov wrote:
> 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
I've checked the patch into master.
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-26 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 14:44 [tarantool-patches] [PATCH v1] LTO build fails on warning message Alexander V. Tikhonov
2019-07-26 17:53 ` [tarantool-patches] " Kirill Yukhin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox