Skip to content

Commit 1d9cebe

Browse files
committed
[embedded] Fix 3 compilation warnings in embedded stdlib
1 parent 8c5d9e2 commit 1d9cebe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

stdlib/public/core/EmbeddedPrint.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public func print(_ string: StaticString, terminator: StaticString = "\n") {
3636
@_disfavoredOverload
3737
public func print(_ string: String, terminator: StaticString = "\n") {
3838
var string = string
39-
_ = string.withUTF8 { buf in
39+
string.withUTF8 { buf in
4040
for c in buf {
4141
putchar(CInt(c))
4242
}
@@ -51,7 +51,7 @@ public func print(_ string: String, terminator: StaticString = "\n") {
5151
@_disfavoredOverload
5252
public func print(_ object: some CustomStringConvertible, terminator: StaticString = "\n") {
5353
var string = object.description
54-
_ = string.withUTF8 { buf in
54+
string.withUTF8 { buf in
5555
for c in buf {
5656
putchar(CInt(c))
5757
}

stdlib/public/core/Optional.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ extension Optional: CustomDebugStringConvertible {
437437
#if !$Embedded
438438
debugPrint(value, terminator: "", to: &result)
439439
#else
440+
_ = value
440441
"(cannot print value in embedded Swift)".write(to: &result)
441442
#endif
442443
result += ")"

0 commit comments

Comments
 (0)