summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-12-14 13:41:03 -0500
committerJoel Fischer <joeljfischer@gmail.com>2017-12-14 13:41:03 -0500
commit4c44838ff5cb6d301668c7635613f9563c84dee6 (patch)
tree3fd272034340fcf7cb86209636d3d2aa8b223f40
parent4ae34ec33abf47b4ba67c49a6d3691dfaac21f7c (diff)
parent89fb94c55810c77047c9a0e36bfad983196f883a (diff)
downloadsdl_ios-4c44838ff5cb6d301668c7635613f9563c84dee6.tar.gz
Merge branch 'develop' into feature/issue_794_CarWindow
-rw-r--r--SmartDeviceLink-iOS.podspec2
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj26
-rw-r--r--SmartDeviceLink.podspec2
-rw-r--r--SmartDeviceLink/CGPoint_Util.m4
-rw-r--r--SmartDeviceLink/SDLAbstractProtocol.m2
-rw-r--r--SmartDeviceLink/SDLArtwork.m4
-rw-r--r--SmartDeviceLink/SDLFunctionID.h2
-rw-r--r--SmartDeviceLink/SDLFunctionID.m2
-rw-r--r--SmartDeviceLink/SDLH264VideoEncoder.m6
-rw-r--r--SmartDeviceLink/SDLHexUtility.m6
-rw-r--r--SmartDeviceLink/SDLIAPSession.m6
-rw-r--r--SmartDeviceLink/SDLIAPTransport.m22
-rw-r--r--SmartDeviceLink/SDLLogTargetFile.m4
-rw-r--r--SmartDeviceLink/SDLPermissionManager.m3
-rw-r--r--SmartDeviceLink/SDLPrioritizedObjectCollection.m4
-rw-r--r--SmartDeviceLink/SDLProtocol.m20
-rw-r--r--SmartDeviceLink/SDLProtocolMessageAssembler.m2
-rw-r--r--SmartDeviceLink/SDLProtocolMessageDisassembler.m4
-rw-r--r--SmartDeviceLink/SDLProxy.m8
-rw-r--r--SmartDeviceLink/SDLRPCNotificationNotification.m5
-rw-r--r--SmartDeviceLink/SDLRPCPayload.m4
-rw-r--r--SmartDeviceLink/SDLRPCResponseNotification.m3
-rw-r--r--SmartDeviceLink/SDLRTPH264Packetizer.m2
-rw-r--r--SmartDeviceLink/SDLRectangle.m2
-rw-r--r--SmartDeviceLink/SDLStreamingMediaLifecycleManager.m2
-rw-r--r--SmartDeviceLink/SDLTCPTransport.m4
-rw-r--r--SmartDeviceLink/SDLTouch.m4
-rw-r--r--SmartDeviceLink/SDLUploadFileOperation.m10
-rw-r--r--SmartDeviceLink/SDLV1ProtocolHeader.m4
-rw-r--r--SmartDeviceLink/SDLV2ProtocolHeader.m4
-rw-r--r--SmartDeviceLink/SDLV2ProtocolMessage.m2
-rw-r--r--SmartDeviceLink/dispatch_timer.m4
m---------bson_c_lib0
33 files changed, 103 insertions, 76 deletions
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index aa1a5ee5c..c9cbdc708 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -7,7 +7,7 @@ s.homepage = "https://github.com/smartdevicelink/SmartDeviceLink-iOS"
s.license = { :type => "New BSD", :file => "LICENSE" }
s.author = { "SmartDeviceLink Team" => "developer@smartdevicelink.com" }
s.platform = :ios, "8.0"
-s.dependency 'BiSON', '~> 1.0'
+s.dependency 'BiSON', '~> 1.1.1'
s.source = { :git => "https://github.com/smartdevicelink/sdl_ios.git", :tag => s.version.to_s }
s.requires_arc = true
s.resource_bundles = { 'SmartDeviceLink' => ['SmartDeviceLink/Assets/**/*'] }
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index ae64c5c17..b6b728b84 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -6136,8 +6136,14 @@
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_STATIC_ANALYZER_MODE = deep;
+ CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
+ CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO;
+ CLANG_WARN_FLOAT_CONVERSION = YES;
+ CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
@@ -6149,6 +6155,9 @@
"DEBUG=1",
"$(inherited)",
);
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_SIGN_COMPARE = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = YES;
INFOPLIST_FILE = SmartDeviceLink/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -6175,8 +6184,14 @@
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_STATIC_ANALYZER_MODE = deep;
+ CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
+ CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO;
+ CLANG_WARN_FLOAT_CONVERSION = YES;
+ CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
@@ -6184,6 +6199,9 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_SIGN_COMPARE = NO;
+ GCC_WARN_UNKNOWN_PRAGMAS = YES;
INFOPLIST_FILE = SmartDeviceLink/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -6232,7 +6250,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.smartdevicelink.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -6263,7 +6281,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "com.smartdevicelink.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 4.0;
};
name = Release;
};
diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec
index ddde1921a..f9232220b 100644
--- a/SmartDeviceLink.podspec
+++ b/SmartDeviceLink.podspec
@@ -7,7 +7,7 @@ s.homepage = "https://github.com/smartdevicelink/SmartDeviceLink-iOS"
s.license = { :type => "New BSD", :file => "LICENSE" }
s.author = { "SmartDeviceLink Team" => "developer@smartdevicelink.com" }
s.platform = :ios, "8.0"
-s.dependency 'BiSON', '~> 1.0'
+s.dependency 'BiSON', '~> 1.1.1'
s.source = { :git => "https://github.com/smartdevicelink/sdl_ios.git", :tag => s.version.to_s }
s.requires_arc = true
s.resource_bundles = { 'SmartDeviceLink' => ['SmartDeviceLink/Assets/**/*'] }
diff --git a/SmartDeviceLink/CGPoint_Util.m b/SmartDeviceLink/CGPoint_Util.m
index 67be5c9fc..91c7ce26e 100644
--- a/SmartDeviceLink/CGPoint_Util.m
+++ b/SmartDeviceLink/CGPoint_Util.m
@@ -16,5 +16,5 @@ CGPoint CGPointCenterOfPoints(CGPoint point1, CGPoint point2) {
}
CGFloat CGPointDistanceBetweenPoints(CGPoint point1, CGPoint point2) {
- return hypotf(point1.x - point2.x, point1.y - point2.y);
-} \ No newline at end of file
+ return hypot(point1.x - point2.x, point1.y - point2.y);
+}
diff --git a/SmartDeviceLink/SDLAbstractProtocol.m b/SmartDeviceLink/SDLAbstractProtocol.m
index fa3502799..70b482d5e 100644
--- a/SmartDeviceLink/SDLAbstractProtocol.m
+++ b/SmartDeviceLink/SDLAbstractProtocol.m
@@ -51,7 +51,7 @@ NS_ASSUME_NONNULL_BEGIN
}
-#pragma - SDLTransportListener Implementation
+#pragma mark - SDLTransportListener Implementation
- (void)onTransportConnected {
for (id<SDLProtocolListener> listener in self.protocolDelegateTable.allObjects) {
if ([listener respondsToSelector:@selector(onProtocolOpened)]) {
diff --git a/SmartDeviceLink/SDLArtwork.m b/SmartDeviceLink/SDLArtwork.m
index 5cd877bc0..ac965f0dd 100644
--- a/SmartDeviceLink/SDLArtwork.m
+++ b/SmartDeviceLink/SDLArtwork.m
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
}
-#pragma Private Lifecycle
+#pragma mark Private Lifecycle
- (instancetype)initWithImage:(UIImage *)image name:(NSString *)name persistent:(BOOL)persistent asImageFormat:(SDLArtworkImageFormat)imageFormat {
NSData *imageData = nil;
@@ -55,4 +55,4 @@ NS_ASSUME_NONNULL_BEGIN
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLFunctionID.h b/SmartDeviceLink/SDLFunctionID.h
index 7cb9d6cb1..d82e38d2c 100644
--- a/SmartDeviceLink/SDLFunctionID.h
+++ b/SmartDeviceLink/SDLFunctionID.h
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (instancetype)sharedInstance;
-- (nullable SDLName)functionNameForId:(int)functionID;
+- (nullable SDLName)functionNameForId:(UInt32)functionID;
- (nullable NSNumber<SDLInt> *)functionIdForName:(SDLName)functionName;
@end
diff --git a/SmartDeviceLink/SDLFunctionID.m b/SmartDeviceLink/SDLFunctionID.m
index 14742e907..7d50014e5 100644
--- a/SmartDeviceLink/SDLFunctionID.m
+++ b/SmartDeviceLink/SDLFunctionID.m
@@ -104,7 +104,7 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
-- (nullable SDLName)functionNameForId:(int)functionID {
+- (nullable SDLName)functionNameForId:(UInt32)functionID {
return self.functionIds[@(functionID)];
}
diff --git a/SmartDeviceLink/SDLH264VideoEncoder.m b/SmartDeviceLink/SDLH264VideoEncoder.m
index 7929c3b11..6a2b6a1c1 100644
--- a/SmartDeviceLink/SDLH264VideoEncoder.m
+++ b/SmartDeviceLink/SDLH264VideoEncoder.m
@@ -58,7 +58,7 @@ static NSDictionary<NSString *, id>* _defaultVideoEncoderSettings;
OSStatus status;
// Create a compression session
- status = VTCompressionSessionCreate(NULL, dimensions.width, dimensions.height, kCMVideoCodecType_H264, NULL, self.sdl_pixelBufferOptions, NULL, &sdl_videoEncoderOutputCallback, (__bridge void *)self, &_compressionSession);
+ status = VTCompressionSessionCreate(NULL, (int32_t)dimensions.width, (int32_t)dimensions.height, kCMVideoCodecType_H264, NULL, self.sdl_pixelBufferOptions, NULL, &sdl_videoEncoderOutputCallback, (__bridge void *)self, &_compressionSession);
if (status != noErr) {
if (!*error) {
@@ -144,7 +144,7 @@ static NSDictionary<NSString *, id>* _defaultVideoEncoderSettings;
timeRate = ((NSNumber *)self.videoEncoderSettings[(__bridge NSString *)kVTCompressionPropertyKey_ExpectedFrameRate]).intValue;
}
- presentationTimestamp = CMTimeMake(self.currentFrameNumber, timeRate);
+ presentationTimestamp = CMTimeMake((int64_t)self.currentFrameNumber, timeRate);
}
self.currentFrameNumber++;
@@ -267,7 +267,7 @@ void sdl_videoEncoderOutputCallback(void * CM_NULLABLE outputCallbackRefCon, voi
const uint8_t *parameterSetPointer;
size_t parameterSetLength;
CMVideoFormatDescriptionGetH264ParameterSetAtIndex(description,
- i,
+ (size_t)i,
&parameterSetPointer,
&parameterSetLength,
NULL,
diff --git a/SmartDeviceLink/SDLHexUtility.m b/SmartDeviceLink/SDLHexUtility.m
index b103322ed..c05283691 100644
--- a/SmartDeviceLink/SDLHexUtility.m
+++ b/SmartDeviceLink/SDLHexUtility.m
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
return ret;
}
-static inline char itoh(int i) {
+static inline char itoh(char i) {
if (i > 9) {
return 'A' + (i - 10);
}
@@ -36,8 +36,8 @@ NSString *getHexString(NSData *data) {
buffer = malloc(length * 2);
for (NSUInteger i = 0; i < length; i++) {
- buffer[i * 2] = itoh((bytes[i] >> 4) & 0xF);
- buffer[(i * 2) + 1] = itoh(bytes[i] & 0xF);
+ buffer[i * 2] = (Byte)itoh((bytes[i] >> 4) & 0xF);
+ buffer[(i * 2) + 1] = (Byte)itoh(bytes[i] & 0xF);
}
NSString *hexString = [[NSString alloc] initWithBytesNoCopy:buffer
diff --git a/SmartDeviceLink/SDLIAPSession.m b/SmartDeviceLink/SDLIAPSession.m
index 86132320c..db64bf678 100644
--- a/SmartDeviceLink/SDLIAPSession.m
+++ b/SmartDeviceLink/SDLIAPSession.m
@@ -86,7 +86,7 @@ NSTimeInterval const StreamThreadWaitSecs = 1.0;
if (self.isDataSession) {
[self.ioStreamThread cancel];
- long lWait = dispatch_semaphore_wait(self.canceledSemaphore, dispatch_time(DISPATCH_TIME_NOW, StreamThreadWaitSecs * NSEC_PER_SEC));
+ long lWait = dispatch_semaphore_wait(self.canceledSemaphore, dispatch_time(DISPATCH_TIME_NOW, (int64_t)(StreamThreadWaitSecs * NSEC_PER_SEC)));
if (lWait == 0) {
SDLLogW(@"Stream thread cancelled");
} else {
@@ -120,7 +120,7 @@ NSTimeInterval const StreamThreadWaitSecs = 1.0;
NSMutableData *remainder = [self.sendDataQueue frontBuffer];
if (remainder != nil && ostream.streamStatus == NSStreamStatusOpen) {
- NSInteger bytesRemaining = remainder.length;
+ NSUInteger bytesRemaining = remainder.length;
NSInteger bytesWritten = [ostream write:remainder.bytes maxLength:bytesRemaining];
if (bytesWritten < 0) {
if (ostream.streamError != nil) {
@@ -131,7 +131,7 @@ NSTimeInterval const StreamThreadWaitSecs = 1.0;
[self.sendDataQueue popBuffer];
} else {
// Cleave the sent bytes from the data, the remainder will sit at the head of the queue
- [remainder replaceBytesInRange:NSMakeRange(0, bytesWritten) withBytes:NULL length:0];
+ [remainder replaceBytesInRange:NSMakeRange(0, (NSUInteger)bytesWritten) withBytes:NULL length:0];
}
}
}
diff --git a/SmartDeviceLink/SDLIAPTransport.m b/SmartDeviceLink/SDLIAPTransport.m
index 68b967e5d..953cafddf 100644
--- a/SmartDeviceLink/SDLIAPTransport.m
+++ b/SmartDeviceLink/SDLIAPTransport.m
@@ -24,8 +24,8 @@ NSString *const IndexedProtocolStringPrefix = @"com.smartdevicelink.prot";
NSString *const MultiSessionProtocolString = @"com.smartdevicelink.multisession";
NSString *const BackgroundTaskName = @"com.sdl.transport.iap.backgroundTask";
-int const CreateSessionRetries = 1;
-int const ProtocolIndexTimeoutSeconds = 20;
+int const CreateSessionRetries = 3;
+int const ProtocolIndexTimeoutSeconds = 10;
@interface SDLIAPTransport () {
BOOL _alreadyDestructed;
@@ -149,7 +149,6 @@ int const ProtocolIndexTimeoutSeconds = 20;
[self sdl_backgroundTaskStart];
}
- self.retryCounter = 0;
[self performSelector:@selector(sdl_connect:) withObject:accessory afterDelay:retryDelay];
}
@@ -161,10 +160,11 @@ int const ProtocolIndexTimeoutSeconds = 20;
- (void)sdl_accessoryDisconnected:(NSNotification *)notification {
EAAccessory *accessory = [notification.userInfo objectForKey:EAAccessoryKey];
if (accessory.connectionID != self.session.accessory.connectionID) {
- SDLLogD(@"Accessory disconnected event (%@)", accessory);
+ SDLLogV(@"Accessory disconnected during control session (%@)", accessory);
+ self.retryCounter = 0;
}
if ([accessory.serialNumber isEqualToString:self.session.accessory.serialNumber]) {
- SDLLogD(@"Connected accessory disconnected event");
+ SDLLogV(@"Accessory disconnected during data session (%@)", accessory);
self.retryCounter = 0;
self.sessionSetupInProgress = NO;
[self disconnect];
@@ -184,7 +184,6 @@ int const ProtocolIndexTimeoutSeconds = 20;
- (void)sdl_applicationWillEnterForeground:(NSNotification *)notification {
SDLLogV(@"App foregrounded, attempting connection");
[self sdl_backgroundTaskEnd];
- self.retryCounter = 0;
[self connect];
}
@@ -421,7 +420,6 @@ int const ProtocolIndexTimeoutSeconds = 20;
}
// Search connected accessories
- self.retryCounter = 0;
[self sdl_connect:nil];
}
@@ -495,7 +493,7 @@ int const ProtocolIndexTimeoutSeconds = 20;
// Read in the stream a single byte at a time
uint8_t buf[1];
- NSUInteger len = [istream read:buf maxLength:1];
+ NSInteger len = [istream read:buf maxLength:1];
if (len <= 0) {
return;
}
@@ -515,7 +513,6 @@ int const ProtocolIndexTimeoutSeconds = 20;
if (accessory.isConnected) {
dispatch_async(dispatch_get_main_queue(), ^{
- self.retryCounter = 0;
[strongSelf sdl_createIAPDataSessionWithAccessory:accessory forProtocol:indexedProtocolString];
});
}
@@ -569,7 +566,12 @@ int const ProtocolIndexTimeoutSeconds = 20;
// It is necessary to check the stream status and whether there are bytes available because the dataStreamHasBytesHandler is executed on the IO thread and the accessory disconnect notification arrives on the main thread, causing data to be passed to the delegate while the main thread is tearing down the transport.
NSInteger bytesRead = [istream read:buf maxLength:[[SDLGlobals sharedGlobals] mtuSizeForServiceType:SDLServiceTypeRPC]];
- NSData *dataIn = [NSData dataWithBytes:buf length:bytesRead];
+ if (bytesRead < 0) {
+ SDLLogE(@"Failed to read from data stream");
+ break;
+ }
+
+ NSData *dataIn = [NSData dataWithBytes:buf length:(NSUInteger)bytesRead];
SDLLogBytes(dataIn, SDLLogBytesDirectionReceive);
if (bytesRead > 0) {
diff --git a/SmartDeviceLink/SDLLogTargetFile.m b/SmartDeviceLink/SDLLogTargetFile.m
index e4e0b74f7..f84185ebb 100644
--- a/SmartDeviceLink/SDLLogTargetFile.m
+++ b/SmartDeviceLink/SDLLogTargetFile.m
@@ -111,8 +111,8 @@ NS_ASSUME_NONNULL_BEGIN
NSArray<NSString *> *sortedLogFilePaths = [self sdl_sortedLogFilePaths];
// If we have more files now than the max, remove the oldest ones
- NSInteger filesToRemove = sortedLogFilePaths.count - maxFiles;
- for (int i = 0; i < filesToRemove; i++) {
+ NSUInteger filesToRemove = sortedLogFilePaths.count - maxFiles;
+ for (NSUInteger i = 0; i < filesToRemove; i++) {
NSString *path = [[self sdl_logDirectory] stringByAppendingPathComponent:sortedLogFilePaths[i]];
[[NSFileManager defaultManager] removeItemAtPath:path error:nil];
}
diff --git a/SmartDeviceLink/SDLPermissionManager.m b/SmartDeviceLink/SDLPermissionManager.m
index b37ca5b5b..f07d4b24f 100644
--- a/SmartDeviceLink/SDLPermissionManager.m
+++ b/SmartDeviceLink/SDLPermissionManager.m
@@ -160,8 +160,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)removeObserverForIdentifier:(SDLPermissionObserverIdentifier)identifier {
NSArray<SDLPermissionFilter *> *filters = [self.filters copy];
-
- for (int i = 0; i < filters.count; i++) {
+ for (NSUInteger i = 0; i < filters.count; i++) {
SDLPermissionFilter *filter = filters[i];
if ([filter.identifier isEqual:identifier]) {
diff --git a/SmartDeviceLink/SDLPrioritizedObjectCollection.m b/SmartDeviceLink/SDLPrioritizedObjectCollection.m
index 398ca4057..b28a99ca7 100644
--- a/SmartDeviceLink/SDLPrioritizedObjectCollection.m
+++ b/SmartDeviceLink/SDLPrioritizedObjectCollection.m
@@ -35,8 +35,8 @@ NS_ASSUME_NONNULL_BEGIN
// Find correct place to insert.
// Sorted in descending order.
BOOL lowerPriorityFound = NO;
- NSInteger currentCount = privateArray.count;
- for (int x = 0; x < currentCount; x++) {
+ NSUInteger currentCount = privateArray.count;
+ for (NSUInteger x = 0; x < currentCount; x++) {
SDLObjectWithPriority *o = privateArray[x];
if (o.priority <= priority) {
lowerPriorityFound = YES;
diff --git a/SmartDeviceLink/SDLProtocol.m b/SmartDeviceLink/SDLProtocol.m
index 2216df326..4093dbfa2 100644
--- a/SmartDeviceLink/SDLProtocol.m
+++ b/SmartDeviceLink/SDLProtocol.m
@@ -106,7 +106,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (SDLProtocolMessage *)sdl_createStartServiceMessageWithType:(SDLServiceType)serviceType encrypted:(BOOL)encryption payload:(nullable NSData *)payload {
- SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals sharedGlobals].majorProtocolVersion];
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:(UInt8)[SDLGlobals sharedGlobals].majorProtocolVersion];
NSData *servicePayload = payload;
switch (serviceType) {
@@ -166,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - End Service
- (void)endServiceWithType:(SDLServiceType)serviceType {
- SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals sharedGlobals].majorProtocolVersion];
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:(UInt8)[SDLGlobals sharedGlobals].majorProtocolVersion];
header.frameType = SDLFrameTypeControl;
header.serviceType = serviceType;
header.frameData = SDLFrameInfoEndService;
@@ -196,7 +196,7 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)sendRPC:(SDLRPCMessage *)message encrypted:(BOOL)encryption error:(NSError *__autoreleasing *)error {
NSParameterAssert(message != nil);
- NSData *jsonData = [NSJSONSerialization dataWithJSONObject:[message serializeAsDictionary:[SDLGlobals sharedGlobals].majorProtocolVersion] options:kNilOptions error:error];
+ NSData *jsonData = [NSJSONSerialization dataWithJSONObject:[message serializeAsDictionary:(Byte)[SDLGlobals sharedGlobals].majorProtocolVersion] options:kNilOptions error:error];
if (error != nil) {
SDLLogW(@"Error encoding JSON data: %@", *error);
@@ -219,17 +219,17 @@ NS_ASSUME_NONNULL_BEGIN
// Build a binary header
// Serialize the RPC data into an NSData
SDLRPCPayload *rpcPayload = [[SDLRPCPayload alloc] init];
- rpcPayload.functionID = [[[SDLFunctionID sharedInstance] functionIdForName:[message getFunctionName]] intValue];
+ rpcPayload.functionID = [[[SDLFunctionID sharedInstance] functionIdForName:[message getFunctionName]] unsignedIntValue];
rpcPayload.jsonData = jsonData;
rpcPayload.binaryData = message.bulkData;
// If it's a request or a response, we need to pull out the correlation ID, so we'll downcast
if ([message isKindOfClass:SDLRPCRequest.class]) {
rpcPayload.rpcType = SDLRPCMessageTypeRequest;
- rpcPayload.correlationID = [((SDLRPCRequest *)message).correlationID intValue];
+ rpcPayload.correlationID = [((SDLRPCRequest *)message).correlationID unsignedIntValue];
} else if ([message isKindOfClass:SDLRPCResponse.class]) {
rpcPayload.rpcType = SDLRPCMessageTypeResponse;
- rpcPayload.correlationID = [((SDLRPCResponse *)message).correlationID intValue];
+ rpcPayload.correlationID = [((SDLRPCResponse *)message).correlationID unsignedIntValue];
} else if ([message isKindOfClass:[SDLRPCNotification class]]) {
rpcPayload.rpcType = SDLRPCMessageTypeNotification;
} else {
@@ -250,7 +250,7 @@ NS_ASSUME_NONNULL_BEGIN
}
// Build the protocol level header & message
- SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals sharedGlobals].majorProtocolVersion];
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:(UInt8)[SDLGlobals sharedGlobals].majorProtocolVersion];
header.encrypted = encryption;
header.frameType = SDLFrameTypeSingle;
header.serviceType = (message.bulkData.length <= 0) ? SDLServiceTypeRPC : SDLServiceTypeBulkData;
@@ -286,7 +286,7 @@ NS_ASSUME_NONNULL_BEGIN
// TODO: (Joel F.)[2016-02-11] Autoreleasepool?
dispatch_async(_sendQueue, ^{
NSData *dataToTransmit = nil;
- while (dataToTransmit = (NSData *)[_prioritizedCollection nextObject]) {
+ while (dataToTransmit = (NSData *)[self->_prioritizedCollection nextObject]) {
[self.transport sendData:dataToTransmit];
};
});
@@ -301,7 +301,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)sdl_sendRawData:(NSData *)data onService:(SDLServiceType)service encryption:(BOOL)encryption {
- SDLV2ProtocolHeader *header = [[SDLV2ProtocolHeader alloc] initWithVersion:[SDLGlobals sharedGlobals].majorProtocolVersion];
+ SDLV2ProtocolHeader *header = [[SDLV2ProtocolHeader alloc] initWithVersion:(UInt8)[SDLGlobals sharedGlobals].majorProtocolVersion];
header.encrypted = encryption;
header.frameType = SDLFrameTypeSingle;
header.serviceType = service;
@@ -476,7 +476,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)handleHeartbeatForSession:(Byte)session {
// Respond with a heartbeat ACK
- SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals sharedGlobals].majorProtocolVersion];
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:(UInt8)[SDLGlobals sharedGlobals].majorProtocolVersion];
header.frameType = SDLFrameTypeControl;
header.serviceType = SDLServiceTypeControl;
header.frameData = SDLFrameInfoHeartbeatACK;
diff --git a/SmartDeviceLink/SDLProtocolMessageAssembler.m b/SmartDeviceLink/SDLProtocolMessageAssembler.m
index 3aa53347a..e02ead324 100644
--- a/SmartDeviceLink/SDLProtocolMessageAssembler.m
+++ b/SmartDeviceLink/SDLProtocolMessageAssembler.m
@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLProtocolMessageAssembler ()
-@property (nullable, strong) NSMutableDictionary<NSNumber *, NSData *> *parts;
+@property (nonatomic, nullable, strong) NSMutableDictionary<NSNumber *, NSData *> *parts;
@end
diff --git a/SmartDeviceLink/SDLProtocolMessageDisassembler.m b/SmartDeviceLink/SDLProtocolMessageDisassembler.m
index 6ab4d32af..21ab55f63 100644
--- a/SmartDeviceLink/SDLProtocolMessageDisassembler.m
+++ b/SmartDeviceLink/SDLProtocolMessageDisassembler.m
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
// How many messages do we need to create to hold that many bytes?
// Note: this does NOT count the special first message which acts as a descriptor.
- NSUInteger numberOfMessagesRequired = ceil((float)incomingPayloadSize / (float)(mtu - headerSize));
+ NSUInteger numberOfMessagesRequired = (NSUInteger)ceil((float)incomingPayloadSize / (float)(mtu - headerSize));
// And how many data bytes go in each message?
NSUInteger numberOfDataBytesPerMessage = mtu - headerSize;
@@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
// Create the middle messages (the ones carrying the actual data).
- for (int n = 0; n < numberOfMessagesRequired - 1; n++) {
+ for (NSUInteger n = 0; n < numberOfMessagesRequired - 1; n++) {
// Frame # after 255 must cycle back to 1, not 0.
// A 0 signals last frame.
UInt8 frameNumber = (n % 255) + 1;
diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m
index 6f19a7686..06ba1e0e9 100644
--- a/SmartDeviceLink/SDLProxy.m
+++ b/SmartDeviceLink/SDLProxy.m
@@ -43,7 +43,7 @@ typedef void (^URLSessionDownloadTaskCompletionHandler)(NSURL *location, NSURLRe
NSString *const SDLProxyVersion = @"5.0.0";
const float StartSessionTime = 10.0;
-const float NotifyProxyClosedDelay = 0.1;
+const float NotifyProxyClosedDelay = (float)0.1;
const int PoliciesCorrelationId = 65535;
static float DefaultConnectionTimeout = 45.0;
@@ -715,15 +715,15 @@ static float DefaultConnectionTimeout = 45.0;
NSUInteger currentStreamOffset = [[stream propertyForKey:NSStreamFileCurrentOffsetKey] unsignedIntegerValue];
NSMutableData *buffer = [NSMutableData dataWithLength:[[SDLGlobals sharedGlobals] mtuSizeForServiceType:SDLServiceTypeRPC]];
- NSUInteger nBytesRead = [(NSInputStream *)stream read:(uint8_t *)buffer.mutableBytes maxLength:buffer.length];
+ NSInteger nBytesRead = [(NSInputStream *)stream read:(uint8_t *)buffer.mutableBytes maxLength:buffer.length];
if (nBytesRead > 0) {
- NSData *data = [buffer subdataWithRange:NSMakeRange(0, nBytesRead)];
+ NSData *data = [buffer subdataWithRange:NSMakeRange(0, (NSUInteger)nBytesRead)];
NSUInteger baseOffset = [(NSNumber *)objc_getAssociatedObject(stream, @"BaseOffset") unsignedIntegerValue];
NSUInteger newOffset = baseOffset + currentStreamOffset;
SDLPutFile *putFileRPCRequest = (SDLPutFile *)objc_getAssociatedObject(stream, @"SDLPutFile");
[putFileRPCRequest setOffset:[NSNumber numberWithUnsignedInteger:newOffset]];
- [putFileRPCRequest setLength:[NSNumber numberWithUnsignedInteger:nBytesRead]];
+ [putFileRPCRequest setLength:[NSNumber numberWithUnsignedInteger:(NSUInteger)nBytesRead]];
[putFileRPCRequest setBulkData:data];
[self sendRPC:putFileRPCRequest];
diff --git a/SmartDeviceLink/SDLRPCNotificationNotification.m b/SmartDeviceLink/SDLRPCNotificationNotification.m
index 78645c695..430269d8d 100644
--- a/SmartDeviceLink/SDLRPCNotificationNotification.m
+++ b/SmartDeviceLink/SDLRPCNotificationNotification.m
@@ -15,15 +15,20 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLRPCNotificationNotification
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wimplicit-atomic-properties"
@synthesize name = _name;
@synthesize object = _object;
@synthesize userInfo = _userInfo;
+#pragma clang diagnostic pop
- (instancetype)initWithName:(NSString *)name object:(nullable id)object rpcNotification:(SDLRPCNotification *)notification {
_name = name;
_object = object;
_userInfo = @{SDLNotificationUserInfoObject: notification};
+ if (!self) { return nil; }
+
return self;
}
diff --git a/SmartDeviceLink/SDLRPCPayload.m b/SmartDeviceLink/SDLRPCPayload.m
index dc6facdf8..ae6704e80 100644
--- a/SmartDeviceLink/SDLRPCPayload.m
+++ b/SmartDeviceLink/SDLRPCPayload.m
@@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN
NSData *binaryData = nil;
NSUInteger offsetOfBinaryData = RPC_HEADER_SIZE + jsonDataSize;
- NSInteger binaryDataSize = data.length - jsonDataSize - RPC_HEADER_SIZE;
+ NSUInteger binaryDataSize = data.length - jsonDataSize - RPC_HEADER_SIZE;
if (binaryDataSize > 0) {
binaryData = [data subdataWithRange:NSMakeRange(offsetOfBinaryData, binaryDataSize)];
}
@@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
*(UInt32 *)&headerBuffer[0] = CFSwapInt32HostToBig(self.functionID);
*(UInt32 *)&headerBuffer[4] = CFSwapInt32HostToBig(self.correlationID);
*(UInt32 *)&headerBuffer[8] = CFSwapInt32HostToBig((UInt32)self.jsonData.length);
- UInt8 rpcType = (self.rpcType & 0x0F) << 4;
+ UInt8 rpcType = (Byte)((self.rpcType & 0x0F) << 4);
headerBuffer[0] &= 0x0F;
headerBuffer[0] |= rpcType;
diff --git a/SmartDeviceLink/SDLRPCResponseNotification.m b/SmartDeviceLink/SDLRPCResponseNotification.m
index 60e94cf8b..150c8b671 100644
--- a/SmartDeviceLink/SDLRPCResponseNotification.m
+++ b/SmartDeviceLink/SDLRPCResponseNotification.m
@@ -15,9 +15,12 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLRPCResponseNotification
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wimplicit-atomic-properties"
@synthesize name = _name;
@synthesize object = _object;
@synthesize userInfo = _userInfo;
+#pragma clang diagnostic pop
- (instancetype)initWithName:(NSString *)name object:(nullable id)object rpcResponse:(SDLRPCResponse *)response {
_name = name;
diff --git a/SmartDeviceLink/SDLRTPH264Packetizer.m b/SmartDeviceLink/SDLRTPH264Packetizer.m
index 06fc645ad..e0f994ede 100644
--- a/SmartDeviceLink/SDLRTPH264Packetizer.m
+++ b/SmartDeviceLink/SDLRTPH264Packetizer.m
@@ -227,7 +227,7 @@ NS_ASSUME_NONNULL_BEGIN
* @return number of bytes written, which is always 12.
*/
- (NSUInteger)sdl_writeRTPHeader:(UInt8 *)rtpHeaderBuffer marker:(BOOL)isLast presentationTimestamp:(double)presentationTimestamp {
- UInt32 presentationTimestampIn90kHz = presentationTimestamp * ClockRate;
+ UInt32 presentationTimestampIn90kHz = (UInt32)(presentationTimestamp * ClockRate);
// Version = 2, Padding = 0, Extension = 0, CSRC count = 0
rtpHeaderBuffer[0] = 0x80;
diff --git a/SmartDeviceLink/SDLRectangle.m b/SmartDeviceLink/SDLRectangle.m
index 6a82312b9..d9e6e412b 100644
--- a/SmartDeviceLink/SDLRectangle.m
+++ b/SmartDeviceLink/SDLRectangle.m
@@ -25,7 +25,7 @@
}
- (instancetype)initWithCGRect:(CGRect)rect {
- return [self initWithX:rect.origin.x y:rect.origin.y width:rect.size.width height:rect.size.height];
+ return [self initWithX:(float)rect.origin.x y:(float)rect.origin.y width:(float)rect.size.width height:(float)rect.size.height];
}
- (void)setX:(NSNumber<SDLFloat> *)x {
diff --git a/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m b/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m
index a32eef96f..5e47a04c0 100644
--- a/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m
+++ b/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m
@@ -352,7 +352,7 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
} else {
// If we can't get capabilities, we're assuming it's H264 RAW at whatever the display capabilities said in the RAIR. We also aren't going to call the data source because they have no options.
SDLVideoStreamingFormat *format = [[SDLVideoStreamingFormat alloc] initWithCodec:SDLVideoStreamingCodecH264 protocol:SDLVideoStreamingProtocolRAW];
- SDLImageResolution *resolution = [[SDLImageResolution alloc] initWithWidth:weakSelf.screenSize.width height:weakSelf.screenSize.height];
+ SDLImageResolution *resolution = [[SDLImageResolution alloc] initWithWidth:(uint16_t)weakSelf.screenSize.width height:(uint16_t)weakSelf.screenSize.height];
weakSelf.preferredFormats = @[format];
weakSelf.preferredResolutions = @[resolution];
diff --git a/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink/SDLTCPTransport.m
index 91e693c8b..fd37ae153 100644
--- a/SmartDeviceLink/SDLTCPTransport.m
+++ b/SmartDeviceLink/SDLTCPTransport.m
@@ -66,7 +66,7 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef
dispatch_async(_sendQueue, ^{
@autoreleasepool {
SDLLogBytes(msgBytes, SDLLogBytesDirectionTransmit);
- CFSocketError e = CFSocketSendData(socket, NULL, (__bridge CFDataRef)msgBytes, 10000);
+ CFSocketError e = CFSocketSendData(self->socket, NULL, (__bridge CFDataRef)msgBytes, 10000);
if (e != kCFSocketSuccess) {
NSString *errorCause = nil;
switch (e) {
@@ -151,7 +151,7 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef
}
// Handle the data we received
- NSData *convertedData = [NSData dataWithBytes:(UInt8 *)CFDataGetBytePtr((CFDataRef)data) length:(int)CFDataGetLength((CFDataRef)data)];
+ NSData *convertedData = [NSData dataWithBytes:(UInt8 *)CFDataGetBytePtr((CFDataRef)data) length:(NSUInteger)CFDataGetLength((CFDataRef)data)];
SDLLogBytes(convertedData, SDLLogBytesDirectionReceive);
[transport.delegate onDataReceived:convertedData];
} else {
diff --git a/SmartDeviceLink/SDLTouch.m b/SmartDeviceLink/SDLTouch.m
index ca1d06441..e4007471f 100644
--- a/SmartDeviceLink/SDLTouch.m
+++ b/SmartDeviceLink/SDLTouch.m
@@ -31,12 +31,12 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithTouchEvent:(SDLTouchEvent *)touchEvent {
self = [self init];
if (self) {
- _identifier = touchEvent.touchEventId.unsignedIntegerValue;
+ _identifier = touchEvent.touchEventId.integerValue;
id firstTimeStamp = touchEvent.timeStamp.firstObject;
// In the event we receive a null timestamp, we will supply a device timestamp.
if ([firstTimeStamp isKindOfClass:[NSNull class]] && [firstTimeStamp isEqual:[NSNull null]]) {
- _timeStamp = [[NSDate date] timeIntervalSince1970] * 1000.0;
+ _timeStamp = (NSUInteger)([[NSDate date] timeIntervalSince1970] * 1000);
} else {
NSNumber *timeStampNumber = (NSNumber *)firstTimeStamp;
_timeStamp = timeStampNumber.unsignedIntegerValue;
diff --git a/SmartDeviceLink/SDLUploadFileOperation.m b/SmartDeviceLink/SDLUploadFileOperation.m
index 4e5b17ba2..fda100fab 100644
--- a/SmartDeviceLink/SDLUploadFileOperation.m
+++ b/SmartDeviceLink/SDLUploadFileOperation.m
@@ -175,13 +175,13 @@ NS_ASSUME_NONNULL_BEGIN
@return The the length of the data being sent in the putfile
*/
+ (NSUInteger)sdl_getPutFileLengthForOffset:(NSUInteger)currentOffset fileSize:(unsigned long long)fileSize mtuSize:(NSUInteger)mtuSize {
- NSInteger putFileLength = 0;
+ NSUInteger putFileLength = 0;
if (currentOffset == 0) {
// The first putfile sends the full file size
- putFileLength = (NSInteger)fileSize;
+ putFileLength = fileSize;
} else if ((fileSize - currentOffset) < mtuSize) {
// The last putfile sends the size of the remaining data
- putFileLength = (NSInteger)(fileSize - currentOffset);
+ putFileLength = fileSize - currentOffset;
} else {
// All other putfiles send the maximum allowed packet size
putFileLength = mtuSize;
@@ -198,7 +198,7 @@ NS_ASSUME_NONNULL_BEGIN
@return The size of the data to be sent in the packet.
*/
+ (NSUInteger)sdl_getDataSizeForOffset:(NSUInteger)currentOffset fileSize:(unsigned long long)fileSize mtuSize:(NSUInteger)mtuSize {
- NSInteger dataSize = 0;
+ NSUInteger dataSize = 0;
NSUInteger fileSizeRemaining = (NSUInteger)(fileSize - currentOffset);
if (fileSizeRemaining < mtuSize) {
dataSize = fileSizeRemaining;
@@ -215,7 +215,7 @@ NS_ASSUME_NONNULL_BEGIN
@param inputStream The socket from which to read the data
@return The data read from the socket
*/
-+ (nullable NSData *)sdl_getDataChunkWithSize:(NSInteger)size inputStream:(NSInputStream *)inputStream {
++ (nullable NSData *)sdl_getDataChunkWithSize:(NSUInteger)size inputStream:(NSInputStream *)inputStream {
if (size <= 0) {
return nil;
}
diff --git a/SmartDeviceLink/SDLV1ProtocolHeader.m b/SmartDeviceLink/SDLV1ProtocolHeader.m
index 288774248..ba6474481 100644
--- a/SmartDeviceLink/SDLV1ProtocolHeader.m
+++ b/SmartDeviceLink/SDLV1ProtocolHeader.m
@@ -22,8 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
// Assembles the properties in the binary header format
Byte headerBytes[ProtocolV1HeaderByteSize] = {0};
- Byte version = (self.version & 0xF) << 4; // first 4 bits
- Byte compressed = (self.encrypted ? 1 : 0) << 3; // next 1 bit
+ Byte version = (Byte)((self.version & 0xF) << 4); // first 4 bits
+ Byte compressed = (Byte)((self.encrypted ? 1 : 0) << 3); // next 1 bit
Byte frameType = (self.frameType & 0x7); // last 3 bits
headerBytes[0] = version | compressed | frameType;
diff --git a/SmartDeviceLink/SDLV2ProtocolHeader.m b/SmartDeviceLink/SDLV2ProtocolHeader.m
index 646c1bee0..ce426fd4d 100644
--- a/SmartDeviceLink/SDLV2ProtocolHeader.m
+++ b/SmartDeviceLink/SDLV2ProtocolHeader.m
@@ -31,8 +31,8 @@ const int ProtocolV2HeaderByteSize = 12;
// Assembles the properties in the binary header format
Byte headerBytes[ProtocolV2HeaderByteSize] = {0};
- Byte version = (self.version & 0xF) << 4; // first 4 bits
- Byte encrypted = (self.encrypted ? 1 : 0) << 3; // next 1 bit
+ Byte version = (Byte)((self.version & 0xF) << 4); // first 4 bits
+ Byte encrypted = (Byte)((self.encrypted ? 1 : 0) << 3); // next 1 bit
Byte frameType = (self.frameType & 0x7); // last 3 bits
headerBytes[0] = version | encrypted | frameType;
diff --git a/SmartDeviceLink/SDLV2ProtocolMessage.m b/SmartDeviceLink/SDLV2ProtocolMessage.m
index 54c4675d8..291dde6a1 100644
--- a/SmartDeviceLink/SDLV2ProtocolMessage.m
+++ b/SmartDeviceLink/SDLV2ProtocolMessage.m
@@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
NSMutableDictionary <NSString *, id> *innerDictionary = [[NSMutableDictionary alloc] init];
NSString *functionName = [[SDLFunctionID sharedInstance] functionNameForId:rpcPayload.functionID];
[innerDictionary setObject:functionName forKey:SDLNameOperationName];
- [innerDictionary setObject:[NSNumber numberWithInt:rpcPayload.correlationID] forKey:SDLNameCorrelationId];
+ [innerDictionary setObject:[NSNumber numberWithUnsignedInt:rpcPayload.correlationID] forKey:SDLNameCorrelationId];
// Get the json data from the struct
if (rpcPayload.jsonData) {
diff --git a/SmartDeviceLink/dispatch_timer.m b/SmartDeviceLink/dispatch_timer.m
index ba2e898a6..445095eb6 100644
--- a/SmartDeviceLink/dispatch_timer.m
+++ b/SmartDeviceLink/dispatch_timer.m
@@ -16,8 +16,8 @@ dispatch_source_t dispatch_create_timer(double afterInterval, bool repeating, di
0,
queue);
dispatch_source_set_timer(timer,
- dispatch_time(DISPATCH_TIME_NOW, afterInterval * NSEC_PER_SEC),
- afterInterval * NSEC_PER_SEC,
+ dispatch_time(DISPATCH_TIME_NOW, (int64_t)(afterInterval * NSEC_PER_SEC)),
+ (uint64_t)(afterInterval * NSEC_PER_SEC),
(1ull * NSEC_PER_SEC) / 10);
dispatch_source_set_event_handler(timer, ^{
if (!repeating) {
diff --git a/bson_c_lib b/bson_c_lib
-Subproject 9981c815541da97cc023bb510c172d09fefa908
+Subproject 82f9e9dcb1f49811ec678a6d19d4f90da831ac0