From 9edb7c26ef7bdcf3bb29e7907b38997f8d5cd0fa Mon Sep 17 00:00:00 2001 From: jack <212554440+jackjackbits@users.noreply.github.com> Date: Fri, 31 Jul 2026 14:29:47 +0100 Subject: [PATCH] Silence the four release-build warnings (#1583) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Co-authored-by: Claude Fable 5 --- bitchat/Identity/SecureIdentityStateManager.swift | 2 +- bitchat/Services/BLE/BLEService.swift | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bitchat/Identity/SecureIdentityStateManager.swift b/bitchat/Identity/SecureIdentityStateManager.swift index 966f210a..4204e940 100644 --- a/bitchat/Identity/SecureIdentityStateManager.swift +++ b/bitchat/Identity/SecureIdentityStateManager.swift @@ -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) } } diff --git a/bitchat/Services/BLE/BLEService.swift b/bitchat/Services/BLE/BLEService.swift index 8891b40e..752d9758 100644 --- a/bitchat/Services/BLE/BLEService.swift +++ b/bitchat/Services/BLE/BLEService.swift @@ -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() } }