Silence the four release-build warnings (#1583)

All four surfaced in the 1.7.1 RC window and are behavior-neutral:

- sendPacket(to:) discarded sendPacketDirected's Bool through generic
  onEngine, tripping unused-result (from #1547's engine-domain flip).
- Both _test_drain*Pipeline helpers captured non-Sendable self in
  @Sendable dispatch closures; they only need the queue, which is
  Sendable — capture that instead.
- removeEphemeralSession returned removeValue's result out of the
  barrier closure, tripping unused-result on sync(flags:execute:).

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jack 2026-07-31 14:29:47 +01:00 committed by GitHub
parent 6f32363774
commit 9edb7c26ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View File

@ -663,7 +663,7 @@ final class SecureIdentityStateManager: SecureIdentityStateManagerProtocol {
func removeEphemeralSession(peerID: PeerID) {
queue.sync(flags: .barrier) {
self.ephemeralSessions.removeValue(forKey: peerID)
_ = self.ephemeralSessions.removeValue(forKey: peerID)
}
}

View File

@ -2943,7 +2943,7 @@ extension BLEService: GossipSyncManager.Delegate {
func sendPacket(to peerID: PeerID, packet: BitchatPacket) {
onEngine {
sendPacketDirected(packet, to: peerID)
_ = sendPacketDirected(packet, to: peerID)
}
}
@ -3336,9 +3336,12 @@ extension BLEService {
}
func _test_drainPrivateMediaSendPipeline() async {
// Capture only the (Sendable) queue, not self, so the @Sendable
// dispatch closures carry no non-Sendable state.
let queue = messageQueue
await withCheckedContinuation { continuation in
self.messageQueue.async { [weak self] in
self?.messageQueue.async {
queue.async {
queue.async {
continuation.resume()
}
}
@ -3357,9 +3360,10 @@ extension BLEService {
}
func _test_drainNoiseMessagePipeline() async {
let queue = messageQueue
await withCheckedContinuation { continuation in
self.messageQueue.async {
self.messageQueue.async {
queue.async {
queue.async {
continuation.resume()
}
}