mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add -Werror
This commit is contained in:
@@ -685,14 +685,14 @@ private final class CallSessionManagerContext {
|
||||
}
|
||||
}
|
||||
|
||||
let keyHash = MTSha1(key)!
|
||||
let keyHash = MTSha1(key)
|
||||
|
||||
var keyId: Int64 = 0
|
||||
keyHash.withUnsafeBytes { (bytes: UnsafePointer<UInt8>) -> Void in
|
||||
memcpy(&keyId, bytes.advanced(by: keyHash.count - 8), 8)
|
||||
}
|
||||
|
||||
let keyVisualHash = MTSha256(key + gA)!
|
||||
let keyVisualHash = MTSha256(key + gA)
|
||||
|
||||
context.state = .confirming(id: id, accessHash: accessHash, key: key, keyId: keyId, keyVisualHash: keyVisualHash, disposable: (confirmCallSession(network: self.network, stableId: id, accessHash: accessHash, gA: gA, keyFingerprint: keyId, maxLayer: self.maxLayer, versions: selectedVersions) |> deliverOnMainQueue).start(next: { [weak self] updatedCall in
|
||||
if let strongSelf = self, let context = strongSelf.contexts[internalId], case .confirming = context.state {
|
||||
@@ -888,18 +888,18 @@ private final class CallSessionManagerContext {
|
||||
}
|
||||
}
|
||||
|
||||
let keyHash = MTSha1(key)!
|
||||
let keyHash = MTSha1(key)
|
||||
|
||||
var keyId: Int64 = 0
|
||||
keyHash.withUnsafeBytes { (bytes: UnsafePointer<UInt8>) -> Void in
|
||||
memcpy(&keyId, bytes.advanced(by: keyHash.count - 8), 8)
|
||||
}
|
||||
|
||||
if MTSha256(gA)! != gAHash {
|
||||
if MTSha256(gA) != gAHash {
|
||||
return nil
|
||||
}
|
||||
|
||||
let keyVisualHash = MTSha256(key + gA)!
|
||||
let keyVisualHash = MTSha256(key + gA)
|
||||
|
||||
return (key, keyId, keyVisualHash)
|
||||
}
|
||||
@@ -1161,7 +1161,7 @@ private func requestCallSession(postbox: Postbox, network: Network, peerId: Peer
|
||||
return .single(.failed(.generic))
|
||||
}
|
||||
|
||||
let gAHash = MTSha256(ga)!
|
||||
let gAHash = MTSha256(ga)
|
||||
|
||||
var callFlags: Int32 = 0
|
||||
if isVideo {
|
||||
|
||||
Reference in New Issue
Block a user