Skip to content

Commit 9bd7929

Browse files
authored
Merge pull request #8699 from rudkx/appease-the-warning-gods
Fix unused variable warnings in release build.
2 parents 5dadfa8 + e1d727d commit 9bd7929

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ namespace {
228228
getBufferSize()};
229229
std::error_code error = llvm::sys::Memory::releaseMappedMemory(memory);
230230
assert(!error && "failed to deallocate read-only zero-filled memory");
231+
(void)error;
231232
}
232233

233234
ZeroFilledMemoryBuffer(const ZeroFilledMemoryBuffer &) = delete;

lib/Frontend/Frontend.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ void CompilerInstance::performParseOnly() {
580580
assert((Kind == InputFileKind::IFK_Swift ||
581581
Kind == InputFileKind::IFK_Swift_Library) &&
582582
"only supports parsing .swift files");
583+
(void)Kind;
583584

584585
auto modImpKind = SourceFile::ImplicitModuleImportKind::None;
585586

lib/Sema/CSApply.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6457,9 +6457,9 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
64576457
->castTo<ExistentialMetatypeType>()
64586458
->getInstanceType();
64596459
}
6460-
auto openedArchetype = openedInstanceTy->castTo<ArchetypeType>();
6461-
assert(openedArchetype->getOpenedExistentialType()
6462-
->isEqual(existentialInstanceTy));
6460+
assert(openedInstanceTy->castTo<ArchetypeType>()
6461+
->getOpenedExistentialType()
6462+
->isEqual(existentialInstanceTy));
64636463

64646464
auto opaqueValue = new (tc.Context)
64656465
OpaqueValueExpr(apply->getLoc(), openedTy);

0 commit comments

Comments
 (0)