Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from gregvis/gregvis-ios-patch-1
Browse files Browse the repository at this point in the history
fixed unsigned int warnings for ios
  • Loading branch information
gregvis committed Apr 30, 2015
2 parents edbc50c + 9422943 commit 23cc43b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ios/ChromeSocketsUdp.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ - (void)setProperties:(NSDictionary*)theProperties
if ([bufferSize integerValue] > UINT32_MAX) {
[_socket setMaxReceiveIPv6BufferSize:UINT32_MAX];
} else {
[_socket setMaxReceiveIPv6BufferSize:[_bufferSize integerValue]];
[_socket setMaxReceiveIPv6BufferSize:(int)[_bufferSize integerValue]];
}
}
}
Expand Down Expand Up @@ -261,7 +261,7 @@ - (void)create:(CDVInvokedUrlCommand*)command

ChromeSocketsUdpSocket *socket = [[ChromeSocketsUdpSocket alloc] initWithId:_nextSocketId++ plugin:self properties:properties];
_sockets[[NSNumber numberWithUnsignedInteger:socket->_socketId]] = socket;
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:socket->_socketId] callbackId:command.callbackId];
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)socket->_socketId] callbackId:command.callbackId];
}

- (void)update:(CDVInvokedUrlCommand*)command
Expand Down Expand Up @@ -342,7 +342,7 @@ - (void)send:(CDVInvokedUrlCommand*)command
VERBOSE_LOG(@"ACK %@.%@ Write: %d", socketId, command.callbackId, success);

if (success) {
[commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:[data length]] callbackId:command.callbackId];
[commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)[data length]] callbackId:command.callbackId];
} else {
[commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[self buildErrorInfoWithErrorCode:[error code] message:[error localizedDescription]]] callbackId:command.callbackId];
}
Expand Down Expand Up @@ -561,7 +561,7 @@ - (void)fireReceiveErrorEventsWithSocketId:(NSUInteger)theSocketId error:(NSErro

NSDictionary* info = @{
@"socketId": [NSNumber numberWithUnsignedInteger:theSocketId],
@"resultCode": [NSNumber numberWithUnsignedInt:[theError code]],
@"resultCode": [NSNumber numberWithUnsignedInt:(int)[theError code]],
@"message": [theError localizedDescription],
};

Expand Down

0 comments on commit 23cc43b

Please sign in to comment.