Skip to content

Commit 5be82d1

Browse files
authored
Fix variable never mutated warning in swift-backtrace (swiftlang#80055)
``` stdlib/public/libexec/swift-backtrace/main.swift:590:15: warning: variable 'now' was never mutated; consider changing to 'let' constant 588 | let name = target!.name 589 | let pid = target!.pid 590 | var now = timespec(tv_sec: 0, tv_nsec: 0) | `- warning: variable 'now' was never mutated; consider changing to 'let' constant 591 | 592 | let ext: String ```
1 parent 1cc13ae commit 5be82d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/libexec/swift-backtrace/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ Generate a backtrace for the parent process.
587587
// If the output path is a directory, generate a filename
588588
let name = target!.name
589589
let pid = target!.pid
590-
var now = timespec(tv_sec: 0, tv_nsec: 0)
590+
let now = timespec(tv_sec: 0, tv_nsec: 0)
591591

592592
let ext: String
593593
switch args.format {

0 commit comments

Comments
 (0)