Skip to content

Commit f603151

Browse files
authored
Fixed all warnings which are fixable (#25)
* Fixed all warnings which are fixable * change modifier open to public
1 parent 19db447 commit f603151

10 files changed

+11
-11
lines changed

Sources/FilestackSDK/Internal/Extensions/Data+base64MD5Digest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension Data {
1515
return Data((withUnsafeBytes { byte -> [UInt8] in
1616
var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
1717

18-
CC_MD5(byte.baseAddress, CC_LONG(count), &digest)
18+
CC_SHA256(byte.baseAddress, CC_LONG(count), &digest)
1919

2020
return digest
2121
})).base64EncodedString()

Sources/FilestackSDK/Internal/Operations/CommitPartUploadOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class CommitPartUploadOperation: BaseOperation<HTTPURLResponse> {
11+
class CommitPartUploadOperation: BaseOperation<HTTPURLResponse>, @unchecked Sendable {
1212
// MARK: - Private Properties
1313

1414
private let descriptor: UploadDescriptor

Sources/FilestackSDK/Internal/Operations/CompleteUploadOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class CompleteUploadOperation: BaseOperation<JSONResponse> {
11+
class CompleteUploadOperation: BaseOperation<JSONResponse>, @unchecked Sendable {
1212
// MARK: - Private Properties
1313

1414
private let partsAndEtags: [Int: String]

Sources/FilestackSDK/Internal/Operations/StartUploadOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class StartUploadOperation: BaseOperation<UploadDescriptor> {
11+
class StartUploadOperation: BaseOperation<UploadDescriptor>, @unchecked Sendable {
1212
// MARK: - Private Properties
1313

1414
private let config: Config

Sources/FilestackSDK/Internal/Operations/SubmitChunkUploadOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class SubmitChunkUploadOperation: BaseOperation<HTTPURLResponse> {
11+
class SubmitChunkUploadOperation: BaseOperation<HTTPURLResponse>, @unchecked Sendable {
1212
// MARK: - Internal Properties
1313

1414
// Part offset

Sources/FilestackSDK/Internal/Operations/SubmitPartIntelligentUploadOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class SubmitPartIntelligentUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation {
11+
class SubmitPartIntelligentUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation, @unchecked Sendable {
1212
// MARK: - Internal Properties
1313

1414
let number: Int

Sources/FilestackSDK/Internal/Operations/SubmitPartRegularUploadOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class SubmitPartRegularUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation {
11+
class SubmitPartRegularUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation, @unchecked Sendable {
1212
// MARK: - Internal Properties
1313

1414
let number: Int

Sources/FilestackSDK/Internal/Operations/SubmitPartsUploadOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class SubmitPartsUploadOperation: BaseOperation<[Int: String]> {
11+
class SubmitPartsUploadOperation: BaseOperation<[Int: String]>, @unchecked Sendable {
1212
// MARK: - Internal Properties
1313

1414
let descriptor: UploadDescriptor

Sources/FilestackSDK/Internal/Operations/UploadOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class UploadOperation: BaseOperation<JSONResponse> {
11+
class UploadOperation: BaseOperation<JSONResponse>, @unchecked Sendable {
1212
// MARK: - Internal Properties
1313

1414
private(set) lazy var progress: Progress = {

Sources/FilestackSDK/Public/Operations/BaseOperation.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Foundation
1717
/// - An executing operation will return `isExecuting` true.
1818
/// - A finished operation will return `isFinished` true.
1919
/// - A cancelled operation will return `isCancelled` true.
20-
open class BaseOperation<Success>: Operation {
20+
open class BaseOperation<Success>: Operation, @unchecked Sendable {
2121
public typealias Result = Swift.Result<Success, Error>
2222

2323
// MARK: - Private Properties
@@ -81,7 +81,7 @@ open class BaseOperation<Success>: Operation {
8181

8282
extension BaseOperation {
8383
/// Returns the result of operation.
84-
open private(set) var result: Result {
84+
public private(set) var result: Result {
8585
get { lockQueue.sync { _result } }
8686
set { lockQueue.sync { _result = newValue } }
8787
}

0 commit comments

Comments
 (0)