Skip to content

Commit

Permalink
Merge pull request #186 from paulz/fix_warnings
Browse files Browse the repository at this point in the history
fix compiler warnings
  • Loading branch information
jasperblues committed Mar 1, 2014
2 parents 5421390 + f560aea commit a8fd6aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ - (struct objc_method_description)methodDescriptionFor:(SEL)methodName inProtoco
break;
}
}
#pragma unused(found)
NSCAssert(found, @"protocol doesn't support factory method with name %@", NSStringFromSelector(methodName));
free(methodDescriptions);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ - (instancetype)initWithInitializer:(TyphoonAssistedFactoryMethodInitializer *)i
_methodSignature = methodSignature;
_closedMethodSignature = [_returnType instanceMethodSignatureForSelector:_initSelector];

#ifdef DEBUG
NSUInteger count = _closedMethodSignature.numberOfArguments - 2;
#endif
NSAssert([self validateInitializerParameterCount:count], @"parameter map for %s do not fill all %lu parameters", sel_getName(_initSelector), (unsigned long) count);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ - (id)valueFromText:(NSString *)textValue withType:(TyphoonTypeDescriptor *)requ
case TyphoonPrimitiveTypeVoid: {
/* Inject all pointers to void and unknown pointers just like void pointers */
if (requiredType.isPointer) {
void *pointer = [self convertToInt:textValue];
void *pointer = (void *)[self convertToInt:textValue];
value = [NSValue valueWithPointer:pointer];
}
else {
Expand Down

0 comments on commit a8fd6aa

Please sign in to comment.