Skip to content

Commit 961b6a9

Browse files
authored
Address a few warnings in WordPressData (#24528)
* Address a string formatting warning in WordPressData * Remove a few redundant `public` modifiers from WordPressData
1 parent 07dce14 commit 961b6a9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sources/WordPressData/Objective-C/ReaderPost.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,9 @@ - (NSString *)likeCountForDisplay
347347
if (count == 0) {
348348
title = likeStr;
349349
} else if (count == 1) {
350-
title = [NSString stringWithFormat:@"%d %@", count, likeStr];
350+
title = [NSString stringWithFormat:@"%ld %@", (long)count, likeStr];
351351
} else {
352-
title = [NSString stringWithFormat:@"%d %@", count, likesStr];
352+
title = [NSString stringWithFormat:@"%ld %@", (long)count, likesStr];
353353
}
354354

355355
return title;

Sources/WordPressData/Swift/Media.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ public extension Media {
99
/// Increments the AutoUpload failure count for this Media object.
1010
///
1111
@objc
12-
public func incrementAutoUploadFailureCount() {
12+
func incrementAutoUploadFailureCount() {
1313
autoUploadFailureCount = NSNumber(value: autoUploadFailureCount.intValue + 1)
1414
}
1515

1616
/// Resets the AutoUpload failure count for this Media object.
1717
///
1818
@objc
19-
public func resetAutoUploadFailureCount() {
19+
func resetAutoUploadFailureCount() {
2020
autoUploadFailureCount = 0
2121
}
2222
/// Returns true if a new attempt to upload the media will be done later.
@@ -44,7 +44,7 @@ public extension Media {
4444
// MARK: - Media Type
4545

4646
/// Returns the MIME type, e.g. "image/png".
47-
@objc public var mimeType: String? {
47+
@objc var mimeType: String? {
4848
guard let fileExtension = self.fileExtension(),
4949
let type = UTType(filenameExtension: fileExtension),
5050
let mimeType = type.preferredMIMEType else {

0 commit comments

Comments
 (0)