Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions Sources/SPTPersistentCacheGarbageCollector.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,8 @@ - (void)enqueueGarbageCollection:(NSTimer *)timer
{
__weak __typeof(self) const weakSelf = self;
NSBlockOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
// We want to shadow `self` in this case.
_Pragma("clang diagnostic push");
_Pragma("clang diagnostic ignored \"-Wshadow\"");
__typeof(weakSelf) const self = weakSelf;
_Pragma("clang diagnostic pop");

SPTPersistentCache * const cache = self.cache;

__typeof(weakSelf) const strongSelf = weakSelf;
SPTPersistentCache * const cache = strongSelf.cache;
[cache runRegularGC];
[cache pruneBySize];
}];
Expand All @@ -98,7 +92,7 @@ - (void)schedule
return;
}

self.timer = [NSTimer timerWithTimeInterval:self.options.garbageCollectionInterval
self.timer = [NSTimer timerWithTimeInterval:(NSTimeInterval)self.options.garbageCollectionInterval
target:self
selector:@selector(enqueueGarbageCollection:)
userInfo:nil
Expand Down
2 changes: 1 addition & 1 deletion Sources/SPTPersistentCacheHeader.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ SPTPersistentCacheRecordHeader SPTPersistentCacheRecordHeaderMake(uint64_t ttl,
return nil;
}

return [NSError spt_persistentDataCacheErrorWithCode:code];
return [NSError spt_persistentDataCacheErrorWithCode:(SPTPersistentCacheLoadingError)code];
}

uint32_t SPTPersistentCacheCalculateHeaderCRC(const SPTPersistentCacheRecordHeader *header)
Expand Down
1 change: 1 addition & 0 deletions Tests/SPTPersistentCacheTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Licensed to the Apache Software Foundation (ASF) under one
specific language governing permissions and limitations
under the License.
*/
// small-change
#import <XCTest/XCTest.h>

#if TARGET_OS_IPHONE
Expand Down
2 changes: 1 addition & 1 deletion ci/spotify_os.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ YES_FOR_RELEASE = $(YES_FOR_RELEASE_$(CONFIGURATION))
// Warnings:
// Attribution: https://github.com/jonreid/XcodeWarnings

WARNING_CFLAGS = -Weverything -Wno-error=deprecated -Wno-objc-missing-property-synthesis -Wno-gnu-conditional-omitted-operand -Wno-gnu -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-auto-import -Wno-missing-variable-declarations -Wno-c++98-compat -Werror -Wno-direct-ivar-access -Wno-padded -Wno-declaration-after-statement
WARNING_CFLAGS = -Weverything -Wno-error=deprecated -Wno-objc-missing-property-synthesis -Wno-gnu-conditional-omitted-operand -Wno-gnu -Wno-documentation-unknown-command -Wno-reserved-id-macro -Wno-auto-import -Wno-missing-variable-declarations -Wno-c++98-compat -Werror -Wno-direct-ivar-access -Wno-padded -Wno-declaration-after-statement -Wno-reserved-identifier -Wno-pre-c11-compat -Wno-switch-default

// Warnings
CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES
Expand Down
Loading