Skip to content

Commit f9c70b4

Browse files
authored
Merge pull request swiftlang#33863 from apple/stdlib-Silence-a-few-assert-related-warnings
[stdlib] Silence a few assert related warnings
2 parents 7dcb0ea + 389d099 commit f9c70b4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

stdlib/public/runtime/Metadata.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ MetadataResponse swift::swift_getCanonicalSpecializedMetadata(
733733
auto key = MetadataCacheKey(cache.NumKeyParameters, cache.NumWitnessTables,
734734
arguments);
735735
auto result = cache.getOrInsert(key, MetadataRequest(MetadataState::Complete, /*isNonBlocking*/true), canonicalMetadata);
736+
(void)result;
736737
assert(result.second.Value == canonicalMetadata);
737738
}
738739
} else {
@@ -744,6 +745,7 @@ MetadataResponse swift::swift_getCanonicalSpecializedMetadata(
744745
auto key = MetadataCacheKey(cache.NumKeyParameters, cache.NumWitnessTables,
745746
arguments);
746747
auto result = cache.getOrInsert(key, MetadataRequest(MetadataState::Complete, /*isNonBlocking*/true), canonicalMetadata);
748+
(void)result;
747749
assert(result.second.Value == canonicalMetadata);
748750
}
749751
}

stdlib/public/stubs/OptionalBridgingHelper.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ - (id)description {
4848
int fmtResult = asprintf(&str, "<%s %p depth = %u>", clsName,
4949
(void*)self,
5050
self->depth);
51+
(void)fmtResult;
5152
assert(fmtResult != -1 && "unable to format description of null");
5253
id result = swift_stdlib_NSStringFromUTF8(str, strlen(str));
5354
free(str);

0 commit comments

Comments
 (0)