Skip to content

Commit

Permalink
Fix compiler warnings in example projects (#506)
Browse files Browse the repository at this point in the history
### Motivation

A recent example project was added that had a compiler warning which
wasn't caught by CI. We can have our example code free of warnings and
ensure they remain so by compiling them with `-warnings-as-errors` in
CI.

On further investigation, we cannot enable `-warnings-as-errors` in the
examples Ci pipeline because we're reusing the shared build/cache
directories which produces its own warnings for left over unused
modules.

### Modifications

- Fix compiler warnings in example.
- ~Build with `-warnings-as-errors` in examples CI pipeline.~

### Result

Example projects compile without warnings.

### Test Plan

~CI updated.~
  • Loading branch information
simonjbeaumont authored Jan 22, 2024
1 parent 62dfe94 commit 7bd8dad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class StreamStorage: @unchecked Sendable {
private func finishedStream(id: String) {
lock.lock()
defer { lock.unlock() }
guard let task = locked_streams[id] else { return }
guard locked_streams[id] != nil else { return }
locked_streams.removeValue(forKey: id)
print("Finished stream \(id)")
}
Expand Down

0 comments on commit 7bd8dad

Please sign in to comment.