Skip to content

Commit 2de8e5a

Browse files
committed
Gardening: Address -Wunused-but-set-variable warnings.
1 parent 110041b commit 2de8e5a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

include/swift/Remote/MetadataReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ class MetadataReader {
14811481
return 0;
14821482
};
14831483

1484-
switch (auto kind = flags.getKind()) {
1484+
switch (flags.getKind()) {
14851485
case ContextDescriptorKind::Module:
14861486
baseSize = sizeof(TargetModuleContextDescriptor<Runtime>);
14871487
break;

lib/Demangling/Demangler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,7 @@ NodePointer Demangler::demangleThunkOrSpecialization() {
28102810
switch (char c = nextChar()) {
28112811
// Thunks that are from a thunk inst. We take the TT namespace.
28122812
case 'T': {
2813-
switch (char c = nextChar()) {
2813+
switch (nextChar()) {
28142814
case 'I':
28152815
return createWithChild(Node::Kind::SILThunkIdentity, popNode(isEntity));
28162816
case 'H':

stdlib/public/runtime/LibPrespecialized.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ void _swift_validatePrespecializedMetadata() {
686686

687687
auto result = swift_getTypeByMangledName(MetadataState::Complete,
688688
mangledName, nullptr, {}, {});
689-
if (auto *error = result.getError()) {
689+
if (result.getError()) {
690690
fprintf(stderr,
691691
"Prespecializations library validation: unable to build metadata "
692692
"for mangled name '%s'\n",

stdlib/public/runtime/MetadataLookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ ResolveAsSymbolicReference::operator()(SymbolicReferenceKind kind,
164164
break;
165165

166166
default:
167-
if (auto typeContext = dyn_cast<TypeContextDescriptor>(descriptor)) {
167+
if (isa<TypeContextDescriptor>(descriptor)) {
168168
nodeKind = Node::Kind::TypeSymbolicReference;
169169
isType = true;
170170
break;

0 commit comments

Comments
 (0)