Build with -Wunused-variable
This commit is contained in:
@@ -32,7 +32,12 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
-Werror=switch-enum -Wswitch-enum -fPIC -fdata-sections -ffunction-sections
|
-Werror=switch-enum
|
||||||
|
-Wswitch-enum
|
||||||
|
-Wunused-variable
|
||||||
|
-fPIC
|
||||||
|
-fdata-sections
|
||||||
|
-ffunction-sections
|
||||||
-fno-jump-tables # https://github.com/llvm/llvm-project/issues/54247
|
-fno-jump-tables # https://github.com/llvm/llvm-project/issues/54247
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -5862,13 +5862,13 @@ void checkVersionsGeqOldestExtant(Node *n,
|
|||||||
case Type_Node0: {
|
case Type_Node0: {
|
||||||
} break;
|
} break;
|
||||||
case Type_Node3: {
|
case Type_Node3: {
|
||||||
auto *self = static_cast<Node3 *>(n);
|
[[maybe_unused]] auto *self = static_cast<Node3 *>(n);
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
assert(self->childMaxVersion[i] >= oldestExtantVersion);
|
assert(self->childMaxVersion[i] >= oldestExtantVersion);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case Type_Node16: {
|
case Type_Node16: {
|
||||||
auto *self = static_cast<Node16 *>(n);
|
[[maybe_unused]] auto *self = static_cast<Node16 *>(n);
|
||||||
for (int i = 0; i < 16; ++i) {
|
for (int i = 0; i < 16; ++i) {
|
||||||
assert(self->childMaxVersion[i] >= oldestExtantVersion);
|
assert(self->childMaxVersion[i] >= oldestExtantVersion);
|
||||||
}
|
}
|
||||||
@@ -5878,7 +5878,7 @@ void checkVersionsGeqOldestExtant(Node *n,
|
|||||||
for (int i = 0; i < 48; ++i) {
|
for (int i = 0; i < 48; ++i) {
|
||||||
assert(self->childMaxVersion[i] >= oldestExtantVersion);
|
assert(self->childMaxVersion[i] >= oldestExtantVersion);
|
||||||
}
|
}
|
||||||
for (auto m : self->maxOfMax) {
|
for ([[maybe_unused]] auto m : self->maxOfMax) {
|
||||||
assert(m >= oldestExtantVersion);
|
assert(m >= oldestExtantVersion);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
@@ -5887,7 +5887,7 @@ void checkVersionsGeqOldestExtant(Node *n,
|
|||||||
for (int i = 0; i < 256; ++i) {
|
for (int i = 0; i < 256; ++i) {
|
||||||
assert(self->childMaxVersion[i] >= oldestExtantVersion);
|
assert(self->childMaxVersion[i] >= oldestExtantVersion);
|
||||||
}
|
}
|
||||||
for (auto m : self->maxOfMax) {
|
for ([[maybe_unused]] auto m : self->maxOfMax) {
|
||||||
assert(m >= oldestExtantVersion);
|
assert(m >= oldestExtantVersion);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
@@ -796,7 +796,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
int temp[stripeSize];
|
int temp[stripeSize];
|
||||||
int stripes = (stringCount + stripeSize - 1) / stripeSize;
|
int stripes = (stringCount + stripeSize - 1) / stripeSize;
|
||||||
StringRef values[stripeSize];
|
StringRef values[stripeSize];
|
||||||
int64_t writeVersions[stripeSize / 2];
|
|
||||||
int ss = stringCount - (stripes - 1) * stripeSize;
|
int ss = stringCount - (stripes - 1) * stripeSize;
|
||||||
int64_t entryDelta = 0;
|
int64_t entryDelta = 0;
|
||||||
for (int s = stripes - 1; s >= 0; s--) {
|
for (int s = stripes - 1; s >= 0; s--) {
|
||||||
|
Reference in New Issue
Block a user