Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix build warnings for integer type coersions.

  • Loading branch information...
commit 1e980508748f63f0d6ba66496097b16706087e95 1 parent c3aae37
@logancollins authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 Mocha/Utilities/MOUtilities.m
View
8 Mocha/Utilities/MOUtilities.m
@@ -91,7 +91,7 @@ JSValueRef MOSelectorInvoke(id target, SEL selector, JSContextRef ctx, size_t ar
NSUInteger methodArgumentCount = [methodSignature numberOfArguments] - 2;
if (methodArgumentCount != argumentCount) {
- NSString *reason = [NSString stringWithFormat:@"ObjC method %@ requires %lu %@, but JavaScript passed %zd %@", NSStringFromSelector(selector), methodArgumentCount, (methodArgumentCount == 1 ? @"argument" : @"arguments"), argumentCount, (argumentCount == 1 ? @"argument" : @"arguments")];
+ NSString *reason = [NSString stringWithFormat:@"ObjC method %@ requires %lu %@, but JavaScript passed %zd %@", NSStringFromSelector(selector), (unsigned long)methodArgumentCount, (methodArgumentCount == 1 ? @"argument" : @"arguments"), argumentCount, (argumentCount == 1 ? @"argument" : @"arguments")];
NSException *e = [NSException exceptionWithName:MORuntimeException reason:reason userInfo:nil];
if (exception != NULL) {
*exception = [runtime JSValueForObject:e];
@@ -356,7 +356,7 @@ JSValueRef MOFunctionInvoke(id function, JSContextRef ctx, size_t argumentCount,
if ((variadic && (callAddressArgumentCount > argumentCount))
|| (!variadic && (callAddressArgumentCount != argumentCount)))
{
- NSString *reason = [NSString stringWithFormat:@"ObjC method %@ requires %lu %@, but JavaScript passed %zd %@", NSStringFromSelector(selector), callAddressArgumentCount, (callAddressArgumentCount == 1 ? @"argument" : @"arguments"), argumentCount, (argumentCount == 1 ? @"argument" : @"arguments")];
+ NSString *reason = [NSString stringWithFormat:@"ObjC method %@ requires %lu %@, but JavaScript passed %zd %@", NSStringFromSelector(selector), (unsigned long)callAddressArgumentCount, (callAddressArgumentCount == 1 ? @"argument" : @"arguments"), argumentCount, (argumentCount == 1 ? @"argument" : @"arguments")];
NSException *e = [NSException exceptionWithName:MORuntimeException reason:reason userInfo:nil];
if (exception != NULL) {
*exception = [runtime JSValueForObject:e];
@@ -386,7 +386,7 @@ JSValueRef MOFunctionInvoke(id function, JSContextRef ctx, size_t argumentCount,
callAddressArgumentCount = [argumentEncodings count] - 2;
if (callAddressArgumentCount != argumentCount) {
- NSString *reason = [NSString stringWithFormat:@"Block requires %lu %@, but JavaScript passed %zd %@", callAddressArgumentCount, (callAddressArgumentCount == 1 ? @"argument" : @"arguments"), argumentCount, (argumentCount == 1 ? @"argument" : @"arguments")];
+ NSString *reason = [NSString stringWithFormat:@"Block requires %lu %@, but JavaScript passed %zd %@", (unsigned long)callAddressArgumentCount, (callAddressArgumentCount == 1 ? @"argument" : @"arguments"), argumentCount, (argumentCount == 1 ? @"argument" : @"arguments")];
NSException *e = [NSException exceptionWithName:MORuntimeException reason:reason userInfo:nil];
if (exception != NULL) {
*exception = [runtime JSValueForObject:e];
@@ -462,7 +462,7 @@ JSValueRef MOFunctionInvoke(id function, JSContextRef ctx, size_t argumentCount,
if ((variadic && (callAddressArgumentCount > argumentCount))
|| (!variadic && (callAddressArgumentCount != argumentCount)))
{
- NSString *reason = [NSString stringWithFormat:@"C function %@ requires %lu %@, but JavaScript passed %zd %@", functionName, callAddressArgumentCount, (callAddressArgumentCount == 1 ? @"argument" : @"arguments"), argumentCount, (argumentCount == 1 ? @"argument" : @"arguments")];
+ NSString *reason = [NSString stringWithFormat:@"C function %@ requires %lu %@, but JavaScript passed %zd %@", functionName, (unsigned long)callAddressArgumentCount, (callAddressArgumentCount == 1 ? @"argument" : @"arguments"), argumentCount, (argumentCount == 1 ? @"argument" : @"arguments")];
NSException *e = [NSException exceptionWithName:MORuntimeException reason:reason userInfo:nil];
if (exception != NULL) {
*exception = [runtime JSValueForObject:e];
Please sign in to comment.
Something went wrong with that request. Please try again.