diff --git a/src/database/graph_db_accessor.cpp b/src/database/graph_db_accessor.cpp index 46f7bf64e..cc3f158b6 100644 --- a/src/database/graph_db_accessor.cpp +++ b/src/database/graph_db_accessor.cpp @@ -74,7 +74,7 @@ void GraphDbAccessor::BuildIndex(const GraphDbTypes::Label &label, // on function exit switch the build_in_progress to false utils::OnScopeExit on_exit([this] { bool expected = true; - [[maybe_unused]] bool success = + [[gnu::unused]] bool success = db_.index_build_in_progress_.compare_exchange_strong(expected, false); debug_assert(success, "BuildIndexInProgress flag was not set during build"); }); diff --git a/src/database/indexes/index_common.hpp b/src/database/indexes/index_common.hpp index 87522a02b..5caefb67c 100644 --- a/src/database/indexes/index_common.hpp +++ b/src/database/indexes/index_common.hpp @@ -155,7 +155,7 @@ static void Refresh( indices_entries_accessor.insert( TIndexEntry(indices_entry, new_record)); - [[maybe_unused]] auto success = + [[gnu::unused]] auto success = indices_entries_accessor.remove(indices_entry); debug_assert(success, "Unable to delete entry."); }