diff --git a/src/communication/server.hpp b/src/communication/server.hpp
index 9a57e63eb..211540853 100644
--- a/src/communication/server.hpp
+++ b/src/communication/server.hpp
@@ -63,7 +63,7 @@ class Server final {
       LOG(FATAL) << "Cannot listen on socket!";
     }
 
-    thread_ = std::thread([this, workers_count, service_name]() {
+    thread_ = std::thread([this, service_name]() {
       utils::ThreadSetName(fmt::format("{} server", service_name));
 
       std::cout << service_name << " server is fully armed and operational"
diff --git a/tools/src/mg_import_csv/main.cpp b/tools/src/mg_import_csv/main.cpp
index abfa7a0c3..09700d98f 100644
--- a/tools/src/mg_import_csv/main.cpp
+++ b/tools/src/mg_import_csv/main.cpp
@@ -162,9 +162,9 @@ std::vector<Field> ReadHeader(std::istream &stream) {
     auto name_and_type = utils::Split(value, ":");
     CHECK(name_and_type.size() == 1U || name_and_type.size() == 2U)
         << fmt::format(
-            "\nExpected a name and optionally a type, got '{}'.\nDid you "
-            "specify a correct CSV delimiter?",
-            value);
+               "\nExpected a name and optionally a type, got '{}'.\nDid you "
+               "specify a correct CSV delimiter?",
+               value);
     auto name = name_and_type[0];
     // When type is missing, default is string.
     std::string type("string");
@@ -476,7 +476,7 @@ std::string GetOutputPath() {
   try {
     auto wal_dir = durability_dir + "/wal";
     if (std::experimental::filesystem::exists(wal_dir)) {
-      for (const auto &wal_file :
+      for ([[gnu::unused]] const auto &wal_file :
            std::experimental::filesystem::directory_iterator(wal_dir)) {
         if (!FLAGS_overwrite) {
           LOG(FATAL) << "Durability directory isn't empty. Pass --overwrite to "