diff --git a/src/box/replication.cc b/src/box/replication.cc
index 30aa6fad3d8f7af9751452488fd5f1d8920cafb0..fea8e825adfb2f6edf97fa45ea626e980ed8d166 100644
--- a/src/box/replication.cc
+++ b/src/box/replication.cc
@@ -76,6 +76,7 @@ replication_init(void)
 {
 	mempool_create(&replica_pool, &cord()->slabc,
 		       sizeof(struct replica));
+	memset(&replicaset, 0, sizeof(replicaset));
 	replicaset_new(&replicaset);
 	vclock_create(&replicaset_vclock);
 }
@@ -183,6 +184,7 @@ void
 replicaset_update(struct applier **appliers, int count)
 {
 	replicaset_t uniq;
+	memset(&uniq, 0, sizeof(uniq));
 	replicaset_new(&uniq);
 	struct replica *replica, *next;
 
diff --git a/src/box/space.cc b/src/box/space.cc
index 88ca232bfd7ab32fd392050d9a21643aeb6ed592..e89afb32797d8e8418bc0890da12cabccae5025b 100644
--- a/src/box/space.cc
+++ b/src/box/space.cc
@@ -83,7 +83,7 @@ space_new(struct space_def *def, struct rlist *key_list)
 	uint32_t index_id_max = 0;
 	uint32_t index_count = 0;
 	struct index_def *index_def;
-	struct index_def *pk = rlist_empty(key_list) ? NULL :
+	MAYBE_UNUSED struct index_def *pk = rlist_empty(key_list) ? NULL :
 		rlist_first_entry(key_list, struct index_def, link);
 	def = space_def_dup(def);
 	rlist_foreach_entry(index_def, key_list, link) {
diff --git a/src/box/vy_tx.c b/src/box/vy_tx.c
index 68094d7bb5437ef7c86b9e660ed50b09e10919a4..1a41e54620ef5bfa64dcdeedfd4b4e35dbea74b8 100644
--- a/src/box/vy_tx.c
+++ b/src/box/vy_tx.c
@@ -690,7 +690,7 @@ vy_tx_track(struct vy_tx *tx, struct vy_index *index,
 	    struct tuple *key, bool is_gap)
 {
 	struct txv *v;
-	uint32_t part_count = tuple_field_count(key);
+	MAYBE_UNUSED uint32_t part_count = tuple_field_count(key);
 
 	/* We do not support tracking range requests. */
 	assert(part_count >= index->cmp_def->part_count);
diff --git a/test/unit/vy_point_iterator.c b/test/unit/vy_point_iterator.c
index b5b8d962e0e6dc950feb06edb631dcb95aa5fd0e..d9c763018e3894a5e8e24fbe2eac77cf1b2ba6ab 100644
--- a/test/unit/vy_point_iterator.c
+++ b/test/unit/vy_point_iterator.c
@@ -268,7 +268,7 @@ test_basic()
 					continue;
 				}
 			}
-			uint32_t got;
+			uint32_t got = 0;
 			tuple_field_u32(res, 1, &got);
 			if (got != expect && expect_lsn != vy_stmt_lsn(res))
 				results_ok = false;