Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: "Alexander V. Tikhonov" <avtikhon@tarantool.org>,
	tarantool-patches@freelists.org
Subject: [tarantool-patches] [PATCH v1] Fix LTO in travis-ci
Date: Tue, 14 May 2019 22:33:10 +0300	[thread overview]
Message-ID: <6183fd46463a384ed9b250120e33cc8d563fdcf7.1557862284.git.avtikhon@tarantool.org> (raw)

Made fixes:
- Added CMAKE_EXTRA_PARAMS environment to docker's container
runs to enable -DENABLE_LTO=ON/OFF cmake option.
- Changed LTO docker's image to 'debian-buster' due to LTO needed
higher versions of packages, check for more information commit:
    commit f9e28ce4602aff3f9bb4e743b0d6167b0f8df88d
    Author: AKhatskevich <avkhatskevich@tarantool.org>
    Date:   Thu Mar 22 11:37:06 2018 +0300
- Fixed sources to avoid of failures on builds with LTO.

Close #4215
---

Github: https://github.com/tarantool/tarantool/compare/avtikhon/lto-build-fix
Issue: https://github.com/tarantool/tarantool/issues/4215

 .travis.mk             | 3 ++-
 .travis.yml            | 4 ++--
 src/box/memtx_rtree.c  | 2 +-
 src/box/sql/vdbeapi.c  | 2 +-
 src/box/tuple_update.c | 2 +-
 src/httpc.c            | 2 +-
 src/lua/httpc.c        | 2 +-
 7 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/.travis.mk b/.travis.mk
index 4ac3fc11a..af392e62d 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -2,7 +2,7 @@
 # Travis CI rules
 #
 
-DOCKER_IMAGE:=packpack/packpack:debian-stretch
+DOCKER_IMAGE?=packpack/packpack:debian-stretch
 
 all: package
 
@@ -27,6 +27,7 @@ docker_%:
 		-e CCACHE_DIR=/cache/ccache \
 		-e COVERALLS_TOKEN=${COVERALLS_TOKEN} \
 		-e TRAVIS_JOB_ID=${TRAVIS_JOB_ID} \
+		-e CMAKE_EXTRA_PARAMS=${CMAKE_EXTRA_PARAMS} \
 		${DOCKER_IMAGE} \
 		make -f .travis.mk $(subst docker_,,$@)
 
diff --git a/.travis.yml b/.travis.yml
index 6e79cf2fe..92fb54686 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,10 +37,10 @@ jobs:
         if: branch = "master"
       # Special targets (only LTO for now).
       - name: "LTO build + test (Linux, gcc)"
-        env: TARGET=test CMAKE_EXTRA_PARAMS=-DENABLE_LTO=ON
+        env: TARGET=test CMAKE_EXTRA_PARAMS=-DENABLE_LTO=ON DOCKER_IMAGE=packpack/packpack:debian-buster
         if: branch = "master"
       - name: "LTO build + test (Linux, clang)"
-        env: TARGET=test CMAKE_EXTRA_PARAMS=-DENABLE_LTO=ON
+        env: TARGET=test CMAKE_EXTRA_PARAMS=-DENABLE_LTO=ON DOCKER_IMAGE=packpack/packpack:debian-buster
         if: branch = "master"
         compiler: clang
       - name: "LTO build + test (OS X Mojave 10.14)"
diff --git a/src/box/memtx_rtree.c b/src/box/memtx_rtree.c
index 45e8fb8e3..b91a405d7 100644
--- a/src/box/memtx_rtree.c
+++ b/src/box/memtx_rtree.c
@@ -71,7 +71,7 @@ static inline int
 mp_decode_rect(struct rtree_rect *rect, unsigned dimension,
 	       const char *mp, unsigned count, const char *what)
 {
-	coord_t c;
+	coord_t c = 0;
 	if (count == dimension) { /* point */
 		for (unsigned i = 0; i < dimension; i++) {
 			if (mp_decode_num(&mp, i, &c) < 0)
diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c
index d2868567b..04083914a 100644
--- a/src/box/sql/vdbeapi.c
+++ b/src/box/sql/vdbeapi.c
@@ -214,7 +214,7 @@ sql_value_double(sql_value * pVal)
 bool
 sql_value_boolean(sql_value *val)
 {
-	bool b;
+	bool b = false;
 	mem_value_bool((struct Mem *) val, &b);
 	return b;
 }
diff --git a/src/box/tuple_update.c b/src/box/tuple_update.c
index 849073258..7a203ced8 100644
--- a/src/box/tuple_update.c
+++ b/src/box/tuple_update.c
@@ -1011,7 +1011,7 @@ update_read_ops(struct tuple_update *update, const char *expr,
 				 "field id must be a number");
 			return -1;
 		}
-		int32_t field_no;
+		int32_t field_no = 0;
 		if (mp_read_i32(update->index_base, op, &expr, &field_no))
 			return -1;
 		if (field_no - update->index_base >= 0) {
diff --git a/src/httpc.c b/src/httpc.c
index 80dabd59c..813a3e387 100644
--- a/src/httpc.c
+++ b/src/httpc.c
@@ -267,7 +267,7 @@ httpc_set_low_speed_limit(struct httpc_request *req, long low_speed_limit)
 void
 httpc_set_verbose(struct httpc_request *req, bool curl_verbose)
 {
-	curl_easy_setopt(req->curl_request.easy, CURLOPT_VERBOSE, curl_verbose);
+	curl_easy_setopt(req->curl_request.easy, CURLOPT_VERBOSE, (long) curl_verbose);
 }
 
 void
diff --git a/src/lua/httpc.c b/src/lua/httpc.c
index c39a2f0de..cdc832efc 100644
--- a/src/lua/httpc.c
+++ b/src/lua/httpc.c
@@ -64,7 +64,7 @@ static int
 parse_headers(lua_State *L, char *buffer, size_t len,
 	      int max_header_name_len)
 {
-	struct http_parser parser;
+	struct http_parser parser = { 0 };
 	parser.hdr_name = (char *) calloc(max_header_name_len, sizeof(char));
 	if (parser.hdr_name == NULL) {
 		diag_set(OutOfMemory, max_header_name_len * sizeof(char),
-- 
2.17.1

             reply	other threads:[~2019-05-14 19:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 19:33 Alexander V. Tikhonov [this message]
2019-05-15  6:09 Alexander V. Tikhonov
2019-05-15 12:44 Alexander V. Tikhonov
2019-05-15 17:31 Alexander V. Tikhonov
2019-05-15 18:04 Alexander V. Tikhonov
2019-05-16  6:26 Alexander V. Tikhonov

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=6183fd46463a384ed9b250120e33cc8d563fdcf7.1557862284.git.avtikhon@tarantool.org \
    --to=avtikhon@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v1] Fix LTO in travis-ci' \
    /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