8000 Feature/fix clang 15 compilation (#18073) · olegrok/arangodb@b91fc7e · GitHub
[go: up one dir, main page]

Skip to content

Commit b91fc7e

Browse files
author
Lars Maier
authored
Feature/fix clang 15 compilation (arangodb#18073)
* Prepare ArangoDB for clang-15. * Small changes.
1 parent f827d24 commit b91fc7e

File tree

7 files changed

+7
-17
lines changed

7 files changed

+7
-17
lines changed

arangod/Agency/RemoveFollower.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ bool RemoveFollower::start(bool&) {
193193
std::unordered_map<std::string, int>
194194
overview; // get an overview over the servers
195195
// -1 : not "GOOD", can be in sync, or leader, or not
196-
// >=0: number of servers for which it is in sync or confirmed
196+
// >=0: number of shards for which it is in sync or confirmed
197197
// leader
198198
bool leaderBad = false;
199199
for (VPackSlice srv : VPackArrayIterator(planned)) {
@@ -231,11 +231,9 @@ bool RemoveFollower::start(bool&) {
231231
});
232232

233233
size_t inSyncCount = 0;
234-
size_t notGoodCount = 0;
235234
for (auto const& pair : overview) {
236-
if (pair.second == -1) {
237-
++notGoodCount;
238-
} else if (static_cast<size_t>(pair.second) >= shardsLikeMe.size()) {
235+
if (pair.second >= 0 &&
236+
static_cast<size_t>(pair.second) >= shardsLikeMe.size()) {
239237
++inSyncCount;
240238
}
241239
}

arangod/Agency/Supervision.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,8 +3348,6 @@ bool Supervision::start(Agent* agent) {
33483348
return start();
33493349
}
33503350

3351-
static std::string const syncLatest = "/Sync/LatestID";
3352-
33533351
void Supervision::getUniqueIds() {
33543352
_lock.assertLockedByCurrentThread();
33553353

arangod/Aql/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ if (USE_MAINTAINER_MODE AND NOT MSVC)
213213
)
214214
endif ()
215215

216-
if (CMAKE_COMPILER_IS_GNUCC)
216+
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
217217
set_source_files_properties(tokens.cpp PROPERTIES COMPILE_FLAGS -Wno-sign-compare)
218218
endif ()
219+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
220+
set_source_files_properties(grammar.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable)
221+
endif ()

arangod/Cluster/AutoRebalance.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,7 @@ int AutoRebalanceProblem::optimize(bool considerLeaderChanges,
513513

514514
ShardImbalance shardImb = computeShardImbalance();
515515
LeaderImbalance leaderImb = computeLeaderImbalance();
516-
size_t count = 0;
517516
for (auto& moves : moveGroups) {
518-
++count;
519-
520517
for (auto& job : moves) {
521518
job.shardImbAfter = shardImb; // copy
522519
job.leaderImbAfter = leaderImb; // copy

arangod/Pregel/Algos/RecoveringPageRank.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ static float EPS = 0.00001f;
3737
static std::string const kConvergence = "convergence";
3838
static std::string const kStep = "step";
3939
static std::string const kRank = "rank";
40-
static std::string const kFailedCount = "failedCount";
4140
static std::string const kNonFailedCount = "nonfailedCount";
4241
static std::string const kScale = "scale";
4342

arangod/RestHandler/RestReplicationHandler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ using Helper = arangodb::basics::VelocyPackHelper;
9292

9393
namespace {
9494
std::string const dataString("data");
95-
std::string const keyString("key");
9695
std::string const typeString("type");
9796
} // namespace
9897

lib/Zip/zip.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,10 +1460,6 @@ extern int ZEXPORT zipWriteInFileInZip(zipFile file, const void* buf,
14601460
if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) {
14611461
uLong uTotalOutBefore = zi->ci.stream.total_out;
14621462
err = deflate(&zi->ci.stream, Z_NO_FLUSH);
1463-
if (uTotalOutBefore > zi->ci.stream.total_out) {
1464-
int bBreak = 0;
1465-
bBreak++;
1466-
}
14671463

14681464
zi->ci.pos_in_buffered_data +=
14691465
(uInt)(zi->ci.stream.total_out - uTotalOutBefore);

0 commit comments

Comments
 (0)
0